<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><!-- generator="wordpress/2.1" --><rss 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:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Jacob Repp</title>
	<link>http://jrepp.com</link>
	<description>Game programming, music and life</description>
	<pubDate>Mon, 03 Aug 2009 17:38:30 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.1</generator>
	<language>en</language>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/jrepp" type="application/rss+xml" /><feedburner:browserFriendly></feedburner:browserFriendly><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com" /><item>
		<title>Google C++ Style Guide</title>
		<link>http://jrepp.com/2009/08/03/google-c-style-guide/</link>
		<comments>http://jrepp.com/2009/08/03/google-c-style-guide/#comments</comments>
		<pubDate>Mon, 03 Aug 2009 17:38:30 +0000</pubDate>
		<dc:creator>proj</dc:creator>
		
		<category><![CDATA[c++]]></category>

		<guid isPermaLink="false">http://jrepp.com/2009/08/03/google-c-style-guide/</guid>
		<description><![CDATA[This is a nice comprehensive guide without the rhetoric you usually get in a C++ style guide. I&#8217;m still working through it

Google C++ Style Guide
]]></description>
			<content:encoded><![CDATA[<p>This is a nice comprehensive guide without the rhetoric you usually get in a C++ style guide. I&#8217;m still working through it</p>

<p><a href="http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml">Google C++ Style Guide</a></p>
]]></content:encoded>
			<wfw:commentRss>http://jrepp.com/2009/08/03/google-c-style-guide/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Select a Single Item in a List View Control</title>
		<link>http://jrepp.com/2009/07/31/select-a-single-item-in-a-list-view-control/</link>
		<comments>http://jrepp.com/2009/07/31/select-a-single-item-in-a-list-view-control/#comments</comments>
		<pubDate>Fri, 31 Jul 2009 18:43:20 +0000</pubDate>
		<dc:creator>proj</dc:creator>
		
		<category><![CDATA[programming]]></category>

		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://jrepp.com/2009/07/31/select-a-single-item-in-a-list-view-control/</guid>
		<description><![CDATA[This simple operation took me longer to figure out than I would like, the answer wasn&#8217;t obvious on msdn or in any of the searches I did so I figure I should just put it up here for anyone else who might look for it:

To select an item in a list view create an LVITEM [...]]]></description>
			<content:encoded><![CDATA[<p>This simple operation took me longer to figure out than I would like, the answer wasn&#8217;t obvious on msdn or in any of the searches I did so I figure I should just put it up here for anyone else who might look for it:</p>

<p>To select an item in a list view create an LVITEM structure, change a few of it&#8217;s fields and pass it to LVM_SETITEMSTATE:</p>

<pre><code>// Select current item in the list
LVITEM item = {0};
item.mask = LVIF_STATE;
item.state = item.stateMask = LVIS_SELECTED;
SendMessage(mhProductList, LVM_SETITEMSTATE, mCurrentSettings, (LPARAM)&amp;item);
</code></pre>

<p>Oh and if you&#8217;re trying to turn on whole line section you&#8217;ll need to use the extended styles:</p>

<pre><code>// Set extended styles
SendMessage(hWndListView, LVM_SETEXTENDEDLISTVIEWSTYLE, 0, LVS_EX_FULLROWSELECT);
</code></pre>
]]></content:encoded>
			<wfw:commentRss>http://jrepp.com/2009/07/31/select-a-single-item-in-a-list-view-control/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Tracking down Circular Dependencies in Static Libraries</title>
		<link>http://jrepp.com/2009/06/26/tracking-down-circular-dependencies-in-static-libraries/</link>
		<comments>http://jrepp.com/2009/06/26/tracking-down-circular-dependencies-in-static-libraries/#comments</comments>
		<pubDate>Fri, 26 Jun 2009 23:18:51 +0000</pubDate>
		<dc:creator>proj</dc:creator>
		
		<category><![CDATA[programming]]></category>

		<category><![CDATA[ruby]]></category>

		<category><![CDATA[linking]]></category>

		<guid isPermaLink="false">http://jrepp.com/2009/06/26/tracking-down-circular-dependencies-in-static-libraries/</guid>
		<description><![CDATA[The GNU linker has some trouble when you present it with multiple library archives that depend upon each other. Libraries with symbols resolved in other libraries must be presented earlier on the command line. You can work around this with a command line argument:

"--start-group", "--end-group", aternatively "-(" "-)"


See the man page for LD for more [...]]]></description>
			<content:encoded><![CDATA[<p>The GNU linker has some trouble when you present it with multiple library archives that depend upon each other. Libraries with symbols resolved in other libraries must be presented earlier on the command line. You can work around this with a command line argument:</p>

<pre><code>"--start-group", "--end-group", aternatively "-(" "-)"
</code></pre>

<p><a href="http://linux.die.net/man/1/ld">See the man page for LD for more info</a></p>

<p>Unfortunately this argument comes with the following little warning:</p>

<blockquote>
  <p>Using this option has a significant performance cost. It is best to use it only when there are unavoidable circular references between two or more archives. </p>
</blockquote>

<p>The particular case I was dealing with was the havok version 6 libraries on linux. I was advised that there may be way to link them but hadn&#8217;t been worked out. In order to test this theory I hacked together a little bit of ruby to show library dependencies. I feel this may be of some use to someone else so I present it here:</p>

<pre><code>require 'find'

$symbs = {}
$archives = []

class Archive
    attr_reader :name, :symbs, :depends, :undef
    def initialize name
        @name = name
        @symbs = {}
        @undef = {}
        @depends = Hash.new(0)
    end

    def add_definition loc, name
        @symbs[name] = loc
        $symbs[name] = self
    end

    def add_undefined name
    @undef[name] = 0
    end

    def resolve_undefined
        @undef.each do |k,v|
            archive = $symbs[k]
           if not archive or archive == self then
                next
            end
            @undef[k] = archive
            @depends[archive] = @depends[archive] + 1
        end
    end
end

Find.find('.') do |path|
    next if not /.a$/.match(path)

    io = IO.popen("nm #{path}")
    archive = Archive.new(path)
    $archives &lt;&lt; archive
    while (str = io.gets) do
        case str
        when /\w+\.a/
            archive = Archive.new(str)
            puts "archive: #{str}"
        when /[A-F0-9]+ [A-Za-z] \w+/
            parts = str.split
            archive.add_definition parts[0], parts[2]
        when /\s+U\s+\w+/
            archive.add_undefined str.split[1]
        end
   end
   puts "processed #{path}, #{archive.symbs.count} defined, #{archive.undef.count} undefined"
end

$archives.each do |archive|
    archive.resolve_undefined
end

$archives.sort! {|a,b| a.depends.count &lt;=&gt; b.depends.count }

puts "dependency list:"
$archives.each do |archive|
    puts "#{archive.name}: #{archive.depends.count}"
    archive.depends.each do |depend,count|
        puts "    #{depend.name}: #{count}"
    end
end
</code></pre>

<p>The final solution was to simply remove the object files from the static libraries and put them into a single combined library:</p>

<pre><code>rm *.o
find . -name \*.a -exec ar x {} \;
ar rcs libHavok.a *.o
ranlib libHavok.a
rm *.o
</code></pre>
]]></content:encoded>
			<wfw:commentRss>http://jrepp.com/2009/06/26/tracking-down-circular-dependencies-in-static-libraries/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Overview of the Z-machine</title>
		<link>http://jrepp.com/2009/06/26/overview-of-the-z-machine/</link>
		<comments>http://jrepp.com/2009/06/26/overview-of-the-z-machine/#comments</comments>
		<pubDate>Fri, 26 Jun 2009 23:01:25 +0000</pubDate>
		<dc:creator>proj</dc:creator>
		
		<category><![CDATA[game programming]]></category>

		<category><![CDATA[games]]></category>

		<category><![CDATA[history]]></category>

		<guid isPermaLink="false">http://jrepp.com/2009/06/26/overview-of-the-z-machine/</guid>
		<description><![CDATA[Here is a good article outlining the Z-machine. This is the machine that runs all of the Infocom text adventures including Zork for which the virtual machine is named. This is some really interesting engineering and you can still see the modern fruits of this online in the Parchment project
]]></description>
			<content:encoded><![CDATA[<p>Here is a <a href="http://www.csd.uwo.ca/Infocom/Articles/small.html">good article</a> outlining the Z-machine. This is the machine that runs all of the Infocom text adventures including Zork for which the virtual machine is named. This is some really interesting engineering and you can still see the modern fruits of this online in the <a href="http://parchment.toolness.com/">Parchment project</a></p>
]]></content:encoded>
			<wfw:commentRss>http://jrepp.com/2009/06/26/overview-of-the-z-machine/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Is CVS dying?</title>
		<link>http://jrepp.com/2009/06/06/is-cvs-dying/</link>
		<comments>http://jrepp.com/2009/06/06/is-cvs-dying/#comments</comments>
		<pubDate>Sat, 06 Jun 2009 02:54:29 +0000</pubDate>
		<dc:creator>proj</dc:creator>
		
		<category><![CDATA[version-control]]></category>

		<category><![CDATA[cmake]]></category>

		<guid isPermaLink="false">http://jrepp.com/2009/06/06/is-cvs-dying/</guid>
		<description><![CDATA[I&#8217;m sure people are still using it but just tonight I was searching for a CVS command line client for windows and had some trouble finding something usable. If you&#8217;re going to use CVS you should probably just use SVN or if you&#8217;re feeling adventurous you could try a DVS. Anyways this is all so [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m sure people are still using it but just tonight I was searching for a CVS command line client for windows and had some trouble finding something usable. If you&#8217;re going to use CVS you should probably just use SVN or if you&#8217;re feeling adventurous you could try a DVS. Anyways this is all so I can make modifications against trunk <a href="http://cmake.org">cmake</a> and see how well it works for our build environment at work.</p>

<p>I did end up finding a <a href="http://ftp.gnu.org/non-gnu/cvs/binary/stable/x86-woe/">command line windows CVS client</a></p>
]]></content:encoded>
			<wfw:commentRss>http://jrepp.com/2009/06/06/is-cvs-dying/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Facebook, twitter and blogging</title>
		<link>http://jrepp.com/2009/06/06/facebook-twitter-and-blogging/</link>
		<comments>http://jrepp.com/2009/06/06/facebook-twitter-and-blogging/#comments</comments>
		<pubDate>Sat, 06 Jun 2009 02:49:40 +0000</pubDate>
		<dc:creator>proj</dc:creator>
		
		<category><![CDATA[blogging]]></category>

		<guid isPermaLink="false">http://jrepp.com/2009/06/06/facebook-twitter-and-blogging/</guid>
		<description><![CDATA[Seems like over the past year or more twitter and facebook have taken over my status updates. This has led to me paying less attention to my blog which is really not a direction I meant to go in. It just sort of happens that it&#8217;s often easier to capture a thought on twitter than [...]]]></description>
			<content:encoded><![CDATA[<p>Seems like over the past year or more <a href="http://twitter.com/jacobrepp">twitter</a> and facebook have taken over my status updates. This has led to me paying less attention to my blog which is really not a direction I meant to go in. It just sort of happens that it&#8217;s often easier to capture a thought on twitter than to go through the effort of writing a blog post. Well.. that has to stop. I actually have a lot of cool things to write about, I just need to sit down and spend some time writing about them.</p>

<p>I think what I would like to do is split my blog into micro-blog/status updates and actual blog posts. It would be ideal if I could use one interface to post to the both and have the micro-blog funnel to twitter/facebook. We&#8217;ll see if that makes sense. In the meantime I&#8217;ll just use a tag for the status updates.</p>
]]></content:encoded>
			<wfw:commentRss>http://jrepp.com/2009/06/06/facebook-twitter-and-blogging/feed/</wfw:commentRss>
		</item>
		<item>
		<title>The Guide to Sound Effects</title>
		<link>http://jrepp.com/2009/02/18/the-guide-to-sound-effects/</link>
		<comments>http://jrepp.com/2009/02/18/the-guide-to-sound-effects/#comments</comments>
		<pubDate>Wed, 18 Feb 2009 20:28:21 +0000</pubDate>
		<dc:creator>proj</dc:creator>
		
		<category><![CDATA[uncategorized]]></category>

		<guid isPermaLink="false">http://jrepp.com/2009/02/18/the-guide-to-sound-effects/</guid>
		<description><![CDATA[Linked from a great em411 blog post: GUIDE TO SOUND EFFECTS
]]></description>
			<content:encoded><![CDATA[<p>Linked from a great em411 blog post: <a href="http://www.epicsound.com/sfx/">GUIDE TO SOUND EFFECTS</a></p>
]]></content:encoded>
			<wfw:commentRss>http://jrepp.com/2009/02/18/the-guide-to-sound-effects/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Nice Collection of Hash Functions</title>
		<link>http://jrepp.com/2008/11/05/nice-collection-of-hash-functions/</link>
		<comments>http://jrepp.com/2008/11/05/nice-collection-of-hash-functions/#comments</comments>
		<pubDate>Wed, 05 Nov 2008 19:54:15 +0000</pubDate>
		<dc:creator>proj</dc:creator>
		
		<category><![CDATA[d]]></category>

		<category><![CDATA[algorithms]]></category>

		<guid isPermaLink="false">http://jrepp.com/2008/11/05/nice-collection-of-hash-functions/</guid>
		<description><![CDATA[Found a nice collection of hash routines written in D. These are easy to convert to other languages. I was just looking for Robert Sedgewick&#8217;s hash function since I didn&#8217;t have his book handy.
]]></description>
			<content:encoded><![CDATA[<p>Found a nice collection of <a href="http://derrick.pallas.us/d/hash/">hash routines written in D</a>. These are easy to convert to other languages. I was just looking for <a href="http://en.wikipedia.org/wiki/Robert_Sedgewick_(computer_scientist)">Robert Sedgewick&#8217;s</a> hash function since I didn&#8217;t have his book handy.</p>
]]></content:encoded>
			<wfw:commentRss>http://jrepp.com/2008/11/05/nice-collection-of-hash-functions/feed/</wfw:commentRss>
		</item>
		<item>
		<title>NVIDIA SATA RAID == Total Fail</title>
		<link>http://jrepp.com/2008/10/31/nvidia-sata-raid-total-fail/</link>
		<comments>http://jrepp.com/2008/10/31/nvidia-sata-raid-total-fail/#comments</comments>
		<pubDate>Fri, 31 Oct 2008 14:37:42 +0000</pubDate>
		<dc:creator>proj</dc:creator>
		
		<category><![CDATA[hardware]]></category>

		<category><![CDATA[nvidia]]></category>

		<category><![CDATA[fail]]></category>

		<guid isPermaLink="false">http://jrepp.com/2008/10/31/nvidia-sata-raid-total-fail/</guid>
		<description><![CDATA[Since my new nForce mobo supported sata raid I figured it would be worthwhile to have a bit of redundancy for my data in the event of a drive failure. I picked up a couple Half TB drives at Fry&#8217;s and put them into a SATA raid-1 configuration. This seemed like a safe bet and [...]]]></description>
			<content:encoded><![CDATA[<p>Since my new nForce mobo supported sata raid I figured it would be worthwhile to have a bit of redundancy for my data in the event of a drive failure. I picked up a couple Half TB drives at Fry&#8217;s and put them into a SATA raid-1 configuration. This seemed like a safe bet and while it was fairly slow to bring this configuration online everything seemed fine.</p>

<p>About a week later I bring my machine up to notice some flashing red text in the BIOS. Once windows was up I had two drives and the nVidia tray icon was bothering me about my drives being in a &#8216;degraded&#8217; state. This is just a fancy way of saying that the RAID setup failed and that I would have to choose a drive that would have the master data and rebuild the array from the BIOS. Note that nothing  out of the ordinary had happened on my machine to cause this to happen. I closely examined the data, figured out which drive was on which controller port and dutifully rebuilt the array. I wasted a good evening going through this because I didn&#8217;t want to lose any data. I had some critical music data on the drive and wanted to make sure I wouldn&#8217;t lose everything. This was a night I normally would have been writing some useful code or recording some music.</p>

<p>To make a long story short this has happened over and over again. I have run integrity checks on the drives and they are both fine. Any time the machine crashes, the drives will go into a degraded state and require yet another manual rebuild. This of course is a complete waste of my time and really there is no excuse for a RAID solution to fail this UN-gracefully. The whole point is to keep me from having to deal with this kind of hassle. Not routinely force me to deal with it for no good reason. So here I am writing this post while I figure out again which drives have the latest files. I am done with NVIDIA SATA RAID. It is a complete and total epic fail. I would not recommend this to anyone.</p>

<p><a href='http://jrepp.com/wp-content/uploads/2008/10/nvidia_fail.png' title='NVIDIA SATA Software FAIL'><img src='http://jrepp.com/wp-content/uploads/2008/10/nvidia_fail.png' alt='NVIDIA SATA Software FAIL' /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://jrepp.com/2008/10/31/nvidia-sata-raid-total-fail/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Investigating DB File Formats</title>
		<link>http://jrepp.com/2008/10/20/investigating-db-file-formats/</link>
		<comments>http://jrepp.com/2008/10/20/investigating-db-file-formats/#comments</comments>
		<pubDate>Mon, 20 Oct 2008 07:04:29 +0000</pubDate>
		<dc:creator>proj</dc:creator>
		
		<category><![CDATA[algorithms]]></category>

		<category><![CDATA[db]]></category>

		<guid isPermaLink="false">http://jrepp.com/2008/10/20/investigating-db-file-formats/</guid>
		<description><![CDATA[Just a small post, maybe more to come detailing actual implementation details:

Tree Structured Indexes

Design of BTRFS
]]></description>
			<content:encoded><![CDATA[<p>Just a small post, maybe more to come detailing actual implementation details:</p>

<p><a href="http://www.isqa.unomaha.edu/haworth/isqa3300/fs010.htm">Tree Structured Indexes</a></p>

<p><a href="http://btrfs.wiki.kernel.org/index.php/Btrfs_design">Design of BTRFS</a></p>
]]></content:encoded>
			<wfw:commentRss>http://jrepp.com/2008/10/20/investigating-db-file-formats/feed/</wfw:commentRss>
		</item>
	</channel>
</rss><!-- Dynamic Page Served (once) in 0.413 seconds -->
