<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments for Account of my unadventures</title>
	<atom:link href="http://unadventure.wordpress.com/comments/feed/" rel="self" type="application/rss+xml" />
	<link>http://unadventure.wordpress.com</link>
	<description>Boring non-technical babble</description>
	<lastBuildDate>Wed, 21 Oct 2009 09:06:05 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>Comment on Accelerating in my pocket by Radek</title>
		<link>http://unadventure.wordpress.com/2008/06/08/accelerating-in-my-pocket/#comment-393</link>
		<dc:creator>Radek</dc:creator>
		<pubDate>Wed, 21 Oct 2009 09:06:05 +0000</pubDate>
		<guid isPermaLink="false">http://unadventure.wordpress.com/?p=50#comment-393</guid>
		<description>Hi, have found out solution to wrong colors in qvga. Hope it helps someone:

* Install fbset program

* Create /etc/fb.modes

mode &quot;vga&quot;
    geometry 480 640 480 1280 16
    timings 40816 8 16 2 16 8 2
    rgba 5/11,6/5,5/0,0/0
endmode

mode &quot;qvga&quot;
    geometry 480 640 480 1280 16
    timings 100000 8 16 2 16 8 2
    rgba 5/11,6/5,5/0,0/0
endmode

  Calling &quot;fbset qvga&quot; and &quot;echo qvga-normal &gt; /sys/bus/spi/devices/spi2.0/state&quot;
  is needed for mplayer in 320x240 with correct colors.</description>
		<content:encoded><![CDATA[<p>Hi, have found out solution to wrong colors in qvga. Hope it helps someone:</p>
<p>* Install fbset program</p>
<p>* Create /etc/fb.modes</p>
<p>mode &#8220;vga&#8221;<br />
    geometry 480 640 480 1280 16<br />
    timings 40816 8 16 2 16 8 2<br />
    rgba 5/11,6/5,5/0,0/0<br />
endmode</p>
<p>mode &#8220;qvga&#8221;<br />
    geometry 480 640 480 1280 16<br />
    timings 100000 8 16 2 16 8 2<br />
    rgba 5/11,6/5,5/0,0/0<br />
endmode</p>
<p>  Calling &#8220;fbset qvga&#8221; and &#8220;echo qvga-normal &gt; /sys/bus/spi/devices/spi2.0/state&#8221;<br />
  is needed for mplayer in 320&#215;240 with correct colors.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Accelerating in my pocket by Andy</title>
		<link>http://unadventure.wordpress.com/2008/06/08/accelerating-in-my-pocket/#comment-392</link>
		<dc:creator>Andy</dc:creator>
		<pubDate>Tue, 20 Oct 2009 20:13:31 +0000</pubDate>
		<guid isPermaLink="false">http://unadventure.wordpress.com/?p=50#comment-392</guid>
		<description>Great blog! Thank you for posting about the Openmoko platform. I think it is so exciting! Please check out my blog @ www.okmko.com and let me know what you think. Cheers!</description>
		<content:encoded><![CDATA[<p>Great blog! Thank you for posting about the Openmoko platform. I think it is so exciting! Please check out my blog @ <a href="http://www.okmko.com" rel="nofollow">http://www.okmko.com</a> and let me know what you think. Cheers!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Unscientific GPS note by Allied Antennas</title>
		<link>http://unadventure.wordpress.com/2008/04/28/unscientific-gps-note/#comment-391</link>
		<dc:creator>Allied Antennas</dc:creator>
		<pubDate>Fri, 09 Oct 2009 01:50:49 +0000</pubDate>
		<guid isPermaLink="false">http://unadventure.wordpress.com/?p=44#comment-391</guid>
		<description>Accuracy is the word to describe it. To get accurate data for OSM , you need to do this test many times, record and compare.</description>
		<content:encoded><![CDATA[<p>Accuracy is the word to describe it. To get accurate data for OSM , you need to do this test many times, record and compare.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on 2: ABI translation by photos of rye</title>
		<link>http://unadventure.wordpress.com/2008/01/04/2-abi-translation/#comment-390</link>
		<dc:creator>photos of rye</dc:creator>
		<pubDate>Sat, 26 Sep 2009 15:53:20 +0000</pubDate>
		<guid isPermaLink="false">http://unadventure.wordpress.com/2008/01/04/2-abi-translation/#comment-390</guid>
		<description>Excellent comment, subscribing to your blog now!,</description>
		<content:encoded><![CDATA[<p>Excellent comment, subscribing to your blog now!,</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Morton numbers by Eric</title>
		<link>http://unadventure.wordpress.com/2009/08/03/morton-numbers/#comment-389</link>
		<dc:creator>Eric</dc:creator>
		<pubDate>Mon, 14 Sep 2009 06:34:55 +0000</pubDate>
		<guid isPermaLink="false">http://unadventure.wordpress.com/?p=61#comment-389</guid>
		<description>Mappage (my webapp) is here:
http://home.exetel.com.au/eric5014/mappage/map.htm

The features I described are not yet on the live version though.

OSM looks OK, and I&#039;m generally a fan of free/open stuff. Adelaide is mostly covered now, and I suspect an old friend of mine has mapped most of the northern suburbs. GM was the best option when I started Mappage: for things like geocoding and translucent polygon overlay there was nothing else. Later it might be possible to decouple from GM so it can sit on something else, but unlikely.

My solution to getting the rectangular range was much like what you suggested.

Scale-wise I kept the scale the same in both directions, keeping the 16th bit clear so I could do comparisons without worrying about sign. Accuracy isn&#039;t important as it&#039;s only for rough sorting, and being in Australia the graticules are close to square.</description>
		<content:encoded><![CDATA[<p>Mappage (my webapp) is here:<br />
<a href="http://home.exetel.com.au/eric5014/mappage/map.htm" rel="nofollow">http://home.exetel.com.au/eric5014/mappage/map.htm</a></p>
<p>The features I described are not yet on the live version though.</p>
<p>OSM looks OK, and I&#8217;m generally a fan of free/open stuff. Adelaide is mostly covered now, and I suspect an old friend of mine has mapped most of the northern suburbs. GM was the best option when I started Mappage: for things like geocoding and translucent polygon overlay there was nothing else. Later it might be possible to decouple from GM so it can sit on something else, but unlikely.</p>
<p>My solution to getting the rectangular range was much like what you suggested.</p>
<p>Scale-wise I kept the scale the same in both directions, keeping the 16th bit clear so I could do comparisons without worrying about sign. Accuracy isn&#8217;t important as it&#8217;s only for rough sorting, and being in Australia the graticules are close to square.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Morton numbers by balrog</title>
		<link>http://unadventure.wordpress.com/2009/08/03/morton-numbers/#comment-388</link>
		<dc:creator>balrog</dc:creator>
		<pubDate>Sun, 13 Sep 2009 17:38:07 +0000</pubDate>
		<guid isPermaLink="false">http://unadventure.wordpress.com/?p=61#comment-388</guid>
		<description>Hi Eric,
[plug]I can&#039;t help asking if you&#039;ve considered switching over to OpenStreetMap for your web app?

Re looking up sites inside a rectangular region, I pondered the same issue and my solution (although not implemented yet) is for every pair of opposite corners to be converted to four (or fewer) integer ranges mapping to one, two or four db queries, depending on where exactly the two corners fall in that &quot;grid&quot;.  Complexity wise making it four lookups instead of one makes no difference.  So if the corners were at, say (-1,-1), (3, 3), then you&#039;d split it up into four square lookups:

(-1, -1)-(0, 0),
(-4, 0)-(0, 4),
(0, -4)-(4, 0),
(0, 0)-(4,4),

each power-of-two-sized, then, in my case, I will just have the server return all results that matched and have the javascript filter out unwanted results.  Assuming the original query is usually for objects visible on the screen, the query will almost always have a screen like width:height ratio, so nearly square, and if it&#039;s square, the area returned from the four queries will never sum up to more than twice the original area.

Note that you can do (lat+90)*360 in the conversion to integers to get a better resolution, unless you have other use for that 16th bit there. Cheers</description>
		<content:encoded><![CDATA[<p>Hi Eric,<br />
[plug]I can&#8217;t help asking if you&#8217;ve considered switching over to OpenStreetMap for your web app?</p>
<p>Re looking up sites inside a rectangular region, I pondered the same issue and my solution (although not implemented yet) is for every pair of opposite corners to be converted to four (or fewer) integer ranges mapping to one, two or four db queries, depending on where exactly the two corners fall in that &#8220;grid&#8221;.  Complexity wise making it four lookups instead of one makes no difference.  So if the corners were at, say (-1,-1), (3, 3), then you&#8217;d split it up into four square lookups:</p>
<p>(-1, -1)-(0, 0),<br />
(-4, 0)-(0, 4),<br />
(0, -4)-(4, 0),<br />
(0, 0)-(4,4),</p>
<p>each power-of-two-sized, then, in my case, I will just have the server return all results that matched and have the javascript filter out unwanted results.  Assuming the original query is usually for objects visible on the screen, the query will almost always have a screen like width:height ratio, so nearly square, and if it&#8217;s square, the area returned from the four queries will never sum up to more than twice the original area.</p>
<p>Note that you can do (lat+90)*360 in the conversion to integers to get a better resolution, unless you have other use for that 16th bit there. Cheers</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Morton numbers by Eric</title>
		<link>http://unadventure.wordpress.com/2009/08/03/morton-numbers/#comment-387</link>
		<dc:creator>Eric</dc:creator>
		<pubDate>Sat, 12 Sep 2009 02:57:09 +0000</pubDate>
		<guid isPermaLink="false">http://unadventure.wordpress.com/?p=61#comment-387</guid>
		<description>I have a webapp that uses Google Maps and a database with lots of sites. I wanted a way of getting lat-lon into some 1D order. I hit upon the idea of scaling the lat &amp; lon to 16-bit integers and interleaving the bits. I should have known I wasn&#039;t the only one! Today I googled and found out that my idea is quite widely used.

I used  (lon+180)*180 and (lat+90)*180 to get 16 &amp; 15 bit integers. I&#039;m using JavaScript and PHP/MySQL.

So I would use this number to filter which sites I load from my DB. I get the two opposite corners, convert both to the integer to see what range I need. A small window will always give you a small integer range unless your window happens to cross a major division.

Alas, that&#039;s exactly what happened! Adelaide (my city) is 138.6E.
(138.6 + 180) * 180 = 0xE004. So the 7/8 of the way around the world longitude line ran right through the area I was looking at! This rendered the filter useless, and I&#039;ve since refined it to get around such problems, but it was just funny that I chose an easy trick with a scaling system that would work almost anywhere but here!

btw Morton number in SQL: conv(bin(n1),4,10) + 2*conv(bin(n2),4,10)</description>
		<content:encoded><![CDATA[<p>I have a webapp that uses Google Maps and a database with lots of sites. I wanted a way of getting lat-lon into some 1D order. I hit upon the idea of scaling the lat &amp; lon to 16-bit integers and interleaving the bits. I should have known I wasn&#8217;t the only one! Today I googled and found out that my idea is quite widely used.</p>
<p>I used  (lon+180)*180 and (lat+90)*180 to get 16 &amp; 15 bit integers. I&#8217;m using JavaScript and PHP/MySQL.</p>
<p>So I would use this number to filter which sites I load from my DB. I get the two opposite corners, convert both to the integer to see what range I need. A small window will always give you a small integer range unless your window happens to cross a major division.</p>
<p>Alas, that&#8217;s exactly what happened! Adelaide (my city) is 138.6E.<br />
(138.6 + 180) * 180 = 0xE004. So the 7/8 of the way around the world longitude line ran right through the area I was looking at! This rendered the filter useless, and I&#8217;ve since refined it to get around such problems, but it was just funny that I chose an easy trick with a scaling system that would work almost anywhere but here!</p>
<p>btw Morton number in SQL: conv(bin(n1),4,10) + 2*conv(bin(n2),4,10)</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Morton numbers by ephemient</title>
		<link>http://unadventure.wordpress.com/2009/08/03/morton-numbers/#comment-381</link>
		<dc:creator>ephemient</dc:creator>
		<pubDate>Mon, 03 Aug 2009 19:18:18 +0000</pubDate>
		<guid isPermaLink="false">http://unadventure.wordpress.com/?p=61#comment-381</guid>
		<description>IEEE-754 floating point numbers are designed such that they can be compared/ordered simply by treating their binary representations as 2&#039;s-complement integers.

So you don&#039;t need to switch to fixed-point to get &quot;two positions that are close to each other in an array sorted by this number probably are close to each other on the map&quot;; it works with even when mixing floats.  Looking at the high bits to &quot;locate something with a desired accuracy&quot; does have a pretty warped scale, though, and the arithmetic tricks here won&#039;t work either.</description>
		<content:encoded><![CDATA[<p>IEEE-754 floating point numbers are designed such that they can be compared/ordered simply by treating their binary representations as 2&#8217;s-complement integers.</p>
<p>So you don&#8217;t need to switch to fixed-point to get &#8220;two positions that are close to each other in an array sorted by this number probably are close to each other on the map&#8221;; it works with even when mixing floats.  Looking at the high bits to &#8220;locate something with a desired accuracy&#8221; does have a pretty warped scale, though, and the arithmetic tricks here won&#8217;t work either.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Python stack in GDB by balrog</title>
		<link>http://unadventure.wordpress.com/2009/02/09/python-stack-in-gdb/#comment-380</link>
		<dc:creator>balrog</dc:creator>
		<pubDate>Sun, 19 Jul 2009 03:01:12 +0000</pubDate>
		<guid isPermaLink="false">http://unadventure.wordpress.com/?p=58#comment-380</guid>
		<description>I tried to use pdb but I couldn&#039;t get it to stop, probably pebkac (do you need to be running from inside python interactive mode?), but the real issue was:

Strace&#039;ing the python program, I saw it use a particular syscall and wanted to know where that was happening in the python code.  I don&#039;t think pdb would let you set a breakpoint at a random memory address given by strace?  That&#039;s where gdb comes helpful.</description>
		<content:encoded><![CDATA[<p>I tried to use pdb but I couldn&#8217;t get it to stop, probably pebkac (do you need to be running from inside python interactive mode?), but the real issue was:</p>
<p>Strace&#8217;ing the python program, I saw it use a particular syscall and wanted to know where that was happening in the python code.  I don&#8217;t think pdb would let you set a breakpoint at a random memory address given by strace?  That&#8217;s where gdb comes helpful.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Python stack in GDB by tahorg</title>
		<link>http://unadventure.wordpress.com/2009/02/09/python-stack-in-gdb/#comment-378</link>
		<dc:creator>tahorg</dc:creator>
		<pubDate>Sat, 18 Jul 2009 22:03:43 +0000</pubDate>
		<guid isPermaLink="false">http://unadventure.wordpress.com/?p=58#comment-378</guid>
		<description>import pdb and just put pdb.set_trace() where you want to stop. The interface is gdb-like, you won&#039;t get lost :)</description>
		<content:encoded><![CDATA[<p>import pdb and just put pdb.set_trace() where you want to stop. The interface is gdb-like, you won&#8217;t get lost :)</p>
]]></content:encoded>
	</item>
</channel>
</rss>
