<?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>Ben McGraw's Egometry</title>
	<atom:link href="http://www.egometry.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.egometry.com</link>
	<description>cogito ergo stfu</description>
	<lastBuildDate>Sun, 15 Aug 2010 05:58:20 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>svn: DB_VERSION_MISMATCH: Database environment version mismatch</title>
		<link>http://www.egometry.com/gruedorf/svn-db_version_mismatch-database-environment-version-mismatch/</link>
		<comments>http://www.egometry.com/gruedorf/svn-db_version_mismatch-database-environment-version-mismatch/#comments</comments>
		<pubDate>Sun, 15 Aug 2010 05:57:34 +0000</pubDate>
		<dc:creator>mcgrue</dc:creator>
				<category><![CDATA[Gruedorf]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://www.egometry.com/?p=957</guid>
		<description><![CDATA[Of course, this was about 10 hours after where I expected to grab my old repo's contents...]]></description>
			<content:encoded><![CDATA[<h2>&#8230;or Part 2 of <a href=http://www.egometry.com/tech/could-not-open-the-requested-svn-filesystem/ target=_blank>&#8220;Could not open the requested SVN filesystem&#8221;</a></h2>
<p>Two years ago I ran into a problem with my SVN filesystem and got &#8220;Could not open the requested SVN filesystem&#8221; as the front-end error.</p>
<p>This appears to be an annoying catch-all error for &#8220;shit is broken with your SVN, dawg.&#8221;</p>
<p>Last time, it was because I had SVNPath defined in my apache&#8217;s httpd.conf file instead of SVNParentPath (when I had many repos in the same root directory.)  This time I did not have that problem, but I did have <i>the same error message</i>.</p>
<p>That is annoying.</p>
<p>After several dead-ends, the vital kernel of information came from <a href=http://mrooney.blogspot.com target=_blank>Mr. Mike Rooney&#8217;s</a> suggestion to go to the host server itself and run:</p>
<pre>
sudo svn ls file:///path/to/local/repo
</pre>
</p>
<p>The two important parts here are that I&#8217;m trying to access the bjorked repo from the local filesystem, so the webdav layer isn&#8217;t being retarded at me and giving me the same enigmatic error message.  The second important part here is that I&#8217;m running sudo to get past possible permission problems.</p>
<p>That command produced the following output:</p>
<pre>
$ sudo svn ls file:///path/to/local/repo/
svn: Unable to open an ra_local session to URL
svn: Unable to open repository 'file:///path/to/local/repo/'
svn: Berkeley DB error for filesystem '/path/to/local/repo/db' while opening environment:

svn: DB_VERSION_MISMATCH: Database environment version mismatch
svn: bdb: Program version 4.6 doesn't match environment version 4.4
</pre>
</p>
<p>At this point, I used the tried and true google-the-unique-error-message technique.  After googling &#8220;svn: DB_VERSION_MISMATCH: Database environment version mismatch&#8221; (including the quotation marks for an exact search), I found <a href="http://www.hermann-uwe.de/taxonomy/term/50" target=_blank>this blog post</a> that solved my problem.</p>
<p>Here&#8217;s the punchline:</p>
<pre>
$ cd /path/to/myrepo/db
$ db4.4_checkpoint -1
$ db4.4_recover
$ db4.4_archive
$ svnlook youngest ..
$ db4.6_archive -d
</pre>
</p>
<h2>BUT&#8230;</h2>
<p>The double-punchline that screwed me for a while was the fact that the berekley db utils for 4.4 were unavailable via apt-get in modern times.  Thankfully, long-time <a href=http://surreality.us target=_blank>systems-administration bad-ass Ted Reed</a> was here to suggest the following set of commands: </p>
<pre>
$ wget http://mirrors.kernel.org/ubuntu/pool/universe/d/db4.4/libdb4.4_4.4.20-12_i386.deb
$ wget http://mirrors.kernel.org/ubuntu/pool/universe/d/db4.4/db4.4-util_4.4.20-12_i386.deb
$ dpkg -i libdb4.4_4.4.20-12_i386.deb
$ dpkg -i db4.4-util_4.4.20-12_i386.deb
</pre>
<p>All of these commands (run as root or through sudo) grab the neccesary files from arcane places and got them installed.  After that, the previous blog post&#8217;s wisdom could be applied.  From there, I was a chmod, a chgrp, and a chown away from actually being able to access my old repository again.
</p>
<p>Of course, this was about 10 hours after where I expected to grab my old repo&#8217;s contents&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.egometry.com/gruedorf/svn-db_version_mismatch-database-environment-version-mismatch/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How to find debian apt-get packages and/or the right source?</title>
		<link>http://www.egometry.com/tech/how-to-find-debian-apt-get-packages-andor-the-right-source/</link>
		<comments>http://www.egometry.com/tech/how-to-find-debian-apt-get-packages-andor-the-right-source/#comments</comments>
		<pubDate>Sun, 15 Aug 2010 02:29:29 +0000</pubDate>
		<dc:creator>mcgrue</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[debian apt-get package sources]]></category>

		<guid isPermaLink="false">http://www.egometry.com/?p=953</guid>
		<description><![CDATA[Ask http://packages.debian.org/ Specifically the searchbox partway down the page under &#8220;Search package directories&#8221;. Yeah, hat&#8217;s about it.]]></description>
			<content:encoded><![CDATA[<p>Ask http://packages.debian.org/</p>
<p>Specifically the searchbox partway down the page under &#8220;Search package directories&#8221;.</p>
<p>Yeah, hat&#8217;s about it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.egometry.com/tech/how-to-find-debian-apt-get-packages-andor-the-right-source/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Turducken For Real Men Is Made Of Death</title>
		<link>http://www.egometry.com/egometry/turducken-for-real-men-is-made-of-death/</link>
		<comments>http://www.egometry.com/egometry/turducken-for-real-men-is-made-of-death/#comments</comments>
		<pubDate>Wed, 28 Jul 2010 20:12:21 +0000</pubDate>
		<dc:creator>mcgrue</dc:creator>
				<category><![CDATA[Ephemera]]></category>
		<category><![CDATA[egometry]]></category>
		<category><![CDATA[irc]]></category>

		<guid isPermaLink="false">http://www.egometry.com/?p=944</guid>
		<description><![CDATA[I feel like you live in "MANmerica" and I live in some pansy ass settlement within it]]></description>
			<content:encoded><![CDATA[<pre>
&lt;Hyptosis&gt; Nice, there was a copper head asleep ontop of the turnoff to our 
           main water vein.
&lt;Hyptosis&gt; And, ontop of the snake
&lt;Hyptosis&gt; I shit you not
&lt;Hyptosis&gt; A fucking Brown Recluse
&lt;Hyptosis&gt; It was like a poison cocktail
&lt;gru&gt; Did you kill them both?
&lt;gru&gt; Or did you decide "Nah, no need to turn off the water."
&lt;Hyptosis&gt; I flick the spider out of the way and tossed the snake into the grass
&lt;Hyptosis&gt; Then turned the water off
&lt;chrisa&gt; I feel like you live in "MANmerica" and I live in some pansy ass
         settlement within it</pre>
<p style="text-align: right;">
<p style="text-align: right;">From <a href="irc://irc.lunarnet.org:4444/#sancho" target="_new">#sancho</a> on <a href="irc://irc.lunarnet.org:4444/#sancho" target="_new">irc.lunarnet.org</a>.</p>
<p style="text-align: right;"><a href="http://www.lorestrome.com/" target="_new">Hyptosis&#8217;s homepage</a><br />
<a href="http://nullcode.org/" target="_new">chrisa&#8217;s homepage</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.egometry.com/egometry/turducken-for-real-men-is-made-of-death/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Experiments in rendering a Tiled Map in javascript/html&#8230;</title>
		<link>http://www.egometry.com/gruedorf/experiments-in-rendering-a-tiled-map-in-javascripthtml/</link>
		<comments>http://www.egometry.com/gruedorf/experiments-in-rendering-a-tiled-map-in-javascripthtml/#comments</comments>
		<pubDate>Fri, 09 Jul 2010 09:53:38 +0000</pubDate>
		<dc:creator>mcgrue</dc:creator>
				<category><![CDATA[Games]]></category>
		<category><![CDATA[Gruedorf]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://www.egometry.com/?p=936</guid>
		<description><![CDATA[Sophia&#8217;s first tiles!Embrace the pixels! Sophia has been chomping at the bit to make more games. Since it&#8217;s been going on two years since I last flexed my gamemaking muscles fully, and since I rather adore Sophia, I&#8217;ve been chasing this rainbow. I&#8217;ve been ever more intrigued by the idea of a pure html/javascript game [...]]]></description>
			<content:encoded><![CDATA[<div style="float: right; padding: 4px; margin: 4px;">
<p><a title="Sophia Game mk1." rel="lightbox[pics936]" href="http://www.egometry.com/i/2010/07/SophiaGame.png"><img class="attachment wp-att-937 alignleft" src="http://www.egometry.com/i/2010/07/SophiaGame.thumbnail.png" alt="Sophia Game mk1." width="192" height="200" /></a></p>
<p>	<span style="color: silver; font-size: -1;"><br />
<br />Sophia&#8217;s first tiles!<br />Embrace the pixels!</span></div>
<p>Sophia has been chomping at the bit to make more games.  Since it&#8217;s been going on <a href="http://www.egometry.com/gruedorf/the-magical-meaning-of-m/">two years since I last flexed my gamemaking muscles fully</a>, and since I rather adore Sophia, I&#8217;ve been chasing this rainbow.</p>
<p>I&#8217;ve been ever more intrigued by the idea of a pure html/javascript game engine of late, and have started taking existing, established tools (like mapeditor.org&#8217;s tiled) and putting them into the browser.</p>
<p><a href="http://www.egometry.com/files/gruedorf_challenge/070/" target=_new>Here&#8217;s the result: (currently firefox-only)</a>. To fully get the pleasure, inspect elements on this example in firebug.</p>
<p>The idea is simple: html/js has affordances baked-in to parse xml documents.  This can handle traditional map data.  css sprite-sheet techniques have been used for years now, which directly mimic old tilset/vsp-style assets.  Combine the two&#8230; and you have a effen map.  Throw in browser optimizations for visible/hidden elements, and we should have a relatively cheap rendering method.</p>
<p>The above test is fairly simple: one 30&#215;30 map, one layer.  It loads instantaneously fast.  It&#8217;s tiles are a single gif sized 304&#215;144.  Fairly economical.  I decided to shove each of these boys into a div for now and use the background-image css spriting technique to get a &#8220;purist&#8221; tiling implementation going.</p>
<p>I opted against using canvas for now because I wanted to see how far I could get without it.  So far so good, but I&#8217;ve not yet really stressed the system.  The next jump will be to take some of my epic 6-layer maps from SotS, translate them into xml, and see how they fair in the browser.</p>
<p>Of the code I wrote, I suppose the &#8220;sauce&#8221; was a fairly common offset calculation.  Although this sort of endeavor may not be so common in the modern age, it&#8217;s pretty commonplace to those of us who labored in 320&#215;240 back in DOS.  Get off my lawn.</p>
<pre>
var tileset = {
    tileWidth: 16,
    tileHeight: 16,
    setWidth: 304,
    setHeight: 144,

    getCoordsfromIdx : function( idx ) {
        var idx = parseInt(idx);
        idx--; //tmx is 1-based, not 0-based.  We need to sub 1 to get to a proper mapping.
        //idx--;

        var perRow = this.setWidth / this.tileWidth;

        var x = idx % perRow;
        var y = (idx / perRow);

        return [
            -(parseInt(x)*parseInt(this.tileWidth)),
            -(parseInt(y)*parseInt(this.tileHeight))
        ];
    }
}
</pre>
<p>This is converting a single tile index into two coordinates for the renderer to consume.  For instance, if you want tile 2, it takes a &#8217;2&#8242; at the top, does some maths, and tells you that tile 2&#8242;s offset is 16 pixels in from the top-left corner, and 0 pixels down (ie, on the top row).  Some strange quirks of this code: I had to decrement the idx, because Tiled&#8217;s xml format is 1-based, not 0 (ie, the first tile, the one at (0,0), is index 1, not index 0); and I negate the two numbers I return because the consumer of these coordinates is a css background-position style, and that&#8217;s how they work.</p>
<p>Also of note was a small hiccup when I uploaded this to my server.  My sandbox had no trouble serving a .tmx file as Content-Type: text/xml, but my big-boy server threw a conniption about it.  I didn&#8217;t realize that was a problem until I threw some debugger statements into the code that &#8220;should&#8217;ve just worked&#8221; and found that all of the proper stuff was in the responseText attribute, but responseXML was null.  So I renamed the mapfile to .xml on the server and everything worked fine.</p>
<p>I guess next step, before trying to stress the system with a super macho map, is to figure out why this isn&#8217;t working in Safari/Chrome/IE/Opera/Whatever&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.egometry.com/gruedorf/experiments-in-rendering-a-tiled-map-in-javascripthtml/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Files, and the editing thereof.</title>
		<link>http://www.egometry.com/gruedorf/files-and-the-editing-thereof/</link>
		<comments>http://www.egometry.com/gruedorf/files-and-the-editing-thereof/#comments</comments>
		<pubDate>Tue, 22 Sep 2009 07:26:38 +0000</pubDate>
		<dc:creator>mcgrue</dc:creator>
				<category><![CDATA[Gruedorf]]></category>

		<guid isPermaLink="false">http://www.egometry.com/?p=905</guid>
		<description><![CDATA[The most pedestrian screenshot ever. To what depths has this once-mighty work-journal fallen? My gruedorf showings are shameful of late, and so are all of yours. The only one holding the line at this moment is Ustor. Perhaps this should be called &#8220;UstorUstor&#8221;. Or &#8220;TorUs&#8221;. At any rate, my small token to personal projects this [...]]]></description>
			<content:encoded><![CDATA[<div style="float: right; width: 200px; margin: 10px;"><a href="http://www.egometry.com/i/2009/09/2009-09-22.jpg" rel="lightbox[pics905]" title="A screenshot of a control panel page.  Woo?"><img src="http://www.egometry.com/i/2009/09/2009-09-22.thumbnail.jpg" alt="2009-09-22" width="169" height="200" class="attachment wp-att-906 alignleft" /></a>
<p class="wp-caption-text" style="color: silver;">The most pedestrian screenshot ever.  To what depths has this once-mighty work-journal fallen?</p>
</div>
<p>My <a href=http://www.johnweng.com/gruedorf/>gruedorf</a> showings are shameful of late, and so are all of yours.  The only one holding the line at this moment is Ustor.  Perhaps this should be called &#8220;UstorUstor&#8221;.  Or &#8220;TorUs&#8221;.</p>
<p>At any rate, my small token to personal projects this week is the file management section&#8217;s edit page.  Woo, now you can edit your files once they exist.  Necessary, and very quotidian to a web developer.</p>
<p>Up next on this mystical journey is the upload section&#8217;s frontpage, featuring most downloaded recently, newest files, and staff picks (aka, <a href=http://verge-rpg.com/demoalarm/>Demo Alarms</a>).  After that, we&#8217;re a docs section from release.  At this point, I think I should screen-scrape my old site&#8217;s documentation and import all of that into a wiki.  Anyone have objections?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.egometry.com/gruedorf/files-and-the-editing-thereof/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>vrpg beta work continues&#8230;</title>
		<link>http://www.egometry.com/gruedorf/vrpg-beta-work-continues/</link>
		<comments>http://www.egometry.com/gruedorf/vrpg-beta-work-continues/#comments</comments>
		<pubDate>Mon, 07 Sep 2009 20:59:13 +0000</pubDate>
		<dc:creator>mcgrue</dc:creator>
				<category><![CDATA[Gruedorf]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[vrpg]]></category>

		<guid isPermaLink="false">http://www.egometry.com/?p=902</guid>
		<description><![CDATA[I&#8217;ve mainly been dealing with code concerning the files section.  I&#8217;ve improved the quality of the upload process, corrected the file lineage graph and made strides towards a saner system, have made it so you can comment upon file entries, and made it so anyone can upload screenshots of any file. Also I made an [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve mainly been dealing with code concerning the files section.  I&#8217;ve improved the quality of the upload process, corrected the file lineage graph and made strides towards a saner system, have made it so you can comment upon file entries, and made it so anyone can upload screenshots of any file.</p>
<p>Also I made an schema-application tool to keep track of which .sql files have been applied in what environment.  Trust me, this is useful.</p>
<p>So where did I go for two months, far, far away from Gruedorf?  I honestly can say I was shocked to crack open this dev folder to find the last svn log from <em>July 10</em>.  So wherever I went, it didn&#8217;t seem as long as it was. :(</p>
]]></content:encoded>
			<wfw:commentRss>http://www.egometry.com/gruedorf/vrpg-beta-work-continues/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP, Language of Mystery</title>
		<link>http://www.egometry.com/tech/php-language-of-mystery/</link>
		<comments>http://www.egometry.com/tech/php-language-of-mystery/#comments</comments>
		<pubDate>Tue, 21 Jul 2009 17:08:12 +0000</pubDate>
		<dc:creator>mcgrue</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://www.egometry.com/?p=896</guid>
		<description><![CDATA[PHP seems so arbitrary sometimes. function test_nine() { $$"9" = 22; } fails to parse. (which is good, I suppose) This passes: function test_nine() { $n = 9; $$n = 22; $this->assertEqual($$n, 22); } -Andy Friesen, of giant-communist-robots.com.]]></description>
			<content:encoded><![CDATA[<p>PHP seems so arbitrary sometimes.</p>
<pre style="background-color: #ccc; font-family: monospace; padding: 10px;">
function test_nine() {
	$$"9" = 22;
}
</pre>
<p>fails to parse.<br />
(which is good, I suppose)</p>
<p>This passes:</p>
<pre style="background-color: #ccc; font-family: monospace; padding: 10px;">
function test_nine() {
	$n = 9;
	$$n = 22;
	$this->assertEqual($$n, 22);
}
</pre>
<p>-Andy Friesen,<br />
of <a href=http://giant-communist-robots.com/>giant-communist-robots.com</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.egometry.com/tech/php-language-of-mystery/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
