<?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>Sambal</title>
	<atom:link href="http://sambal.org/feed/" rel="self" type="application/rss+xml" />
	<link>http://sambal.org</link>
	<description>trying to avoid labels</description>
	<lastBuildDate>Wed, 08 Feb 2012 03:42:26 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Sqlite &#8216;database table is locked&#8217; error</title>
		<link>http://sambal.org/2012/02/sqlite-database-table-is-locked-error/</link>
		<comments>http://sambal.org/2012/02/sqlite-database-table-is-locked-error/#comments</comments>
		<pubDate>Wed, 08 Feb 2012 03:42:26 +0000</pubDate>
		<dc:creator>Sam</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://sambal.org/?p=856</guid>
		<description><![CDATA[Having even one query in-progress prevents you from dropping even a temp table in sqlite.  Have a nice day.]]></description>
			<content:encoded><![CDATA[<p>You might think that the following two designs for a routine are equivalent.</p>
<p>First:</p>
<pre class="brush: cpp; title: ; notranslate">
 int lookup( int nKey )
 {
   m_qLookup.Reset();
   m_qLookup.Bind( 1, nKey );
   int rc = m_qLookup.Step();
   if( rc != SQLITE_ROW )
     return 0;

   int n = m_qLookup.GetColumnInt(0);

   // some more processing on n

   return n;
 }
 </pre>
<p>Second:</p>
<pre class="brush: cpp; title: ; notranslate">
 int lookup( int nKey )
 {
   int n = 0;

   m_qLookup.Bind( 1, nKey );
   int rc = m_qLookup.Step();
   if( rc == SQLITE_ROW )
   {
     n = m_qLookup.GetColumnInt(0);

     // some more processing on n
   }
   m_qLookup.Reset();

   return n;
 }
 </pre>
<p>Yeah, they&#8217;re logically equivalent.  It&#8217;s no error to <code>Reset()</code> a query before it&#8217;s been used, and it&#8217;s fine for a query to be in-progress when you <code>Finalize()</code> it at the end of processing.  The first way has an early return, which some people find ugly.  Personally I think that indenting the extra processing (line 11 in example 2) is uglier, especially when it&#8217;s more than a few lines.</p>
<p>Except for the one big difference &#8212; that is, that the first version, once called, makes it impossible to drop any table, even a temp table, from the database.</p>
<p>I just ran into this.  Apparently having any query in progress (after the first <code>Step()</code> and before any <code>Reset()</code>) creates a lock on the schema which prevents certain schema changes.  In particular, adds are OK but drops are not.  And the apparent action is non-local &#8212; shall I say, spooky action at a distance?  In my case the query that was un-Reset was in one module and the code that created, used, and dropped (or rather, <strong>failed</strong> to drop) the temp table was in another module entirely.</p>
<p>Fortunately for me, I had not merged in anybody else&#8217;s code yet, so I knew that the the problem had been caused by something I did recently, and it only took a little while to track down.  More fortunately, the code was trivially transformed into something that didn&#8217;t leave the query open.</p>
]]></content:encoded>
			<wfw:commentRss>http://sambal.org/2012/02/sqlite-database-table-is-locked-error/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Vaguely Paranoid Musings</title>
		<link>http://sambal.org/2011/03/vaguely-paranoid-musings/</link>
		<comments>http://sambal.org/2011/03/vaguely-paranoid-musings/#comments</comments>
		<pubDate>Thu, 24 Mar 2011 19:05:54 +0000</pubDate>
		<dc:creator>Sam</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://sambal.org/?p=854</guid>
		<description><![CDATA[What if Kim Jong Il wanted to go out with a bang?  Plus: how Obama could get another Peace Prize.]]></description>
			<content:encoded><![CDATA[<p>If Kim Jong Il wanted to be a dick, he&#8217;d flip a low-yield nuke at Fukushima Daiichi right now.</p>
<p>Two reasons:<br />
1. Poke Japan and the US in the eye, possibly contaminate a US carrier battle group (or two!);<br />
2. Remind everyone that unlike Khadafy, he has not given up his WMD and therefore it&#8217;s not safe to play him like Saddam</p>
<p>Besides, what&#8217;s he got to lose?  The dude&#8217;s dying anyway.</p>
<p>On the other hand, who&#8217;s to say that the CVBG Reagan isn&#8217;t there in part to make dumb moves by North Koreans less likely?  That was the underlying purpose of their original mission to South Korea, right?  I mean.. to take part in &#8220;war games&#8221;, which basically means the same thing &#8211; don&#8217;t shoot at SK Navy ships when you might miss and hit the Americans, okay guys?</p>
<p>And who&#8217;s to say that the Reagan hasn&#8217;t detached an Aegis cruiser and a couple of escorts and sent them to the <a href="http://en.wikipedia.org/wiki/Sea_of_Japan_naming_dispute">Sea of Japan (oops I mean East Sea)</a> to discourage any NK funny business while Japan is busy responding to natural disasters?</p>
<p>But what really makes me wonder is, <a href="http://www.globalsecurity.org/military/ops/where.htm">where are the other carriers</a>?  Washington and Reagan are in Japan; Enterprise and Vinson are around the Arabian peninsula, and Lincoln is in the South China Sea.  </p>
<p>So: two in Japan, two near the Persian gulf, and one in between.  None of them are supporting current operations against Libya, oddly.  </p>
<p>But they&#8217;re ideally positioned in case Neo-bama had decided, say, to preemptively decapitate or defang (by removing WMD capabilities) Iran and North Korea &#8212; the remaining two members of W&#8217;s &#8220;Axis of Evil.&#8221;  And who&#8217;s gonna stop him if he wants to?  We can see that <a href="http://www.sfgate.com/cgi-bin/article.cgi?f=/c/a/2011/03/24/BART1II30A.DTL&#038;feed=rss.news">even anti-war Democrats like Boxer and Pelosi are completely supine</a> when it&#8217;s a member of their own party starting an undeclared war.  And could Republicans really complain if the current administration started taking, what, 31 years of hawkish rhetoric seriously?</p>
<p>And if it worked out, Obama might even get another peace prize.</p>
]]></content:encoded>
			<wfw:commentRss>http://sambal.org/2011/03/vaguely-paranoid-musings/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Badge Care</title>
		<link>http://sambal.org/2011/03/badge-care/</link>
		<comments>http://sambal.org/2011/03/badge-care/#comments</comments>
		<pubDate>Tue, 15 Mar 2011 14:04:37 +0000</pubDate>
		<dc:creator>Sam</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://sambal.org/?p=853</guid>
		<description><![CDATA[Do not use for any other purpose other than for access control or identification. Do not leave in direct sun light, for example on the dash of your car. Do not expose to extreme heat or open flame. For example, clothes dryers or clothes irons. Do not expose to organic solvents, thinners, mineral spirits, etc. [...]]]></description>
			<content:encoded><![CDATA[<ul>
<li> Do not use for any other purpose other than for access control or identification. </li>
<li> Do not leave in direct sun light, for example on the dash of your car. </li>
<li> Do not expose to extreme heat or open flame.  For example, clothes dryers or clothes irons. </li>
<li> Do not expose to organic solvents, thinners, mineral spirits, etc.</li>
<li> Do not use as an ice scraper or scraping tool. </li>
<li> Do not crimp, bend, or twist card. </li>
<li> Do not re-laminate. </li>
<li> Do not immerse in alcohol, Isopropyl, ethanol, methyl, etc. </li>
<li> <strong>Do not bite.</strong></li>
<li> Do not pound with a pen or tool. </li>
<li> Do not punch a slot or hole in an undesignated area. </li>
<li> Do not scratch or place any decals on your card. </li>
<li> Do not wash your card. </li>
</ul>
<p>(Admonishments to RAH ID card issuees; sadly, most of these must be from experience&#8230;)</p>
]]></content:encoded>
			<wfw:commentRss>http://sambal.org/2011/03/badge-care/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Little-Known Fact</title>
		<link>http://sambal.org/2011/03/little-known-fact/</link>
		<comments>http://sambal.org/2011/03/little-known-fact/#comments</comments>
		<pubDate>Wed, 09 Mar 2011 14:16:39 +0000</pubDate>
		<dc:creator>Sam</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://sambal.org/?p=852</guid>
		<description><![CDATA[Before Mark Zuckerberg founded Facebook (with the motto &#8220;move fast and break things&#8221;) he was involved in a previous venture. This startup &#8212; promoting Kellog&#8217;s All-Bran cereal &#8212; had the motto &#8220;breakfast and move things&#8221;.]]></description>
			<content:encoded><![CDATA[<p>Before Mark Zuckerberg founded Facebook (with the motto &#8220;move fast and break things&#8221;) he was involved in a previous venture.</p>
<p>This startup &#8212; promoting Kellog&#8217;s All-Bran cereal &#8212; had the motto &#8220;breakfast and move things&#8221;.</p>
]]></content:encoded>
			<wfw:commentRss>http://sambal.org/2011/03/little-known-fact/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>If We Took Michael Moore&#8217;s Advice</title>
		<link>http://sambal.org/2011/03/if-we-took-michael-moores-advice/</link>
		<comments>http://sambal.org/2011/03/if-we-took-michael-moores-advice/#comments</comments>
		<pubDate>Wed, 09 Mar 2011 12:45:16 +0000</pubDate>
		<dc:creator>Sam</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://sambal.org/?p=851</guid>
		<description><![CDATA[Michael Moore says the US is not broke: all &#8220;we the people&#8221; need to do is take the money back from the fat cat billionaires. What if we took this advice? Let&#8217;s imagine expropriating some of the wealth of the richest man in America, William Gates III. Forbes says he&#8217;s worth about $54 billion, of [...]]]></description>
			<content:encoded><![CDATA[<p>Michael Moore says the US is not broke: all &#8220;we the people&#8221; need to do is take the money back from the fat cat billionaires.</p>
<p>What if we took this advice?  Let&#8217;s imagine expropriating some of the wealth of the richest man in America, William Gates III.  Forbes says <a href="http://www.forbes.com/profile/bill-gates">he&#8217;s worth about $54 billion</a>, of which $16 billion is his Microsoft stock.  Let&#8217;s start by taking that.</p>
<p>OK, so now we&#8217;ve seized about 7% of Microsoft&#8217;s stock.  That&#8217;s the largest single block of stock, which should give us some privileges like picking a board member or two.  Unfortunately we don&#8217;t have actual control of the company because, well, the other 93% could easily outvote us.  So we have to sell the stock in order to get cash.</p>
<p>MSFT is trading at $25.91 right now.  If we dump shares on the market the price will drop somewhat &#8211; say ten percent.  So we&#8217;ll clear about $14.5 billion dollars during our sellout, driving the MSFT share price to $23.32.  (Incidentally, this will reduce the wealth of everyone else who holds MSFT stock by a total of about $22 billion.)</p>
<p>OK!  Now we&#8217;ve got $14.5 billion in cash for &#8220;we the people&#8221;.  That&#8217;s, uh, $50 per person.  OK, here you go.  Fifty bucks.  That really helped a lot.</p>
<p>What were the secondary effects?  Well, I&#8217;d guess for starters that any publicly-traded company which has substantial ownership by a billionaire will suffer a hit in stock prices: that would be Berkshire Hathaway, Oracle, Microsoft again (Paul Allen), Wal-Mart, <del datetime="2011-03-09T12:49:10+00:00">Koch Industries</del> (privately held), <del datetime="2011-03-09T12:50:29+00:00">Bloomberg</del> (privately held), Google, <del datetime="2011-03-09T12:51:01+00:00">Facebook</del> (limited trading), Apple&#8230;   After all, if the government (we the people!) demonstrates a willingness to take Bill Gates&#8217;s stock and sell it, why would these others be safe?</p>
<p>Ding!  What&#8217;s that I hear?  It&#8217;s another delicious running-dog treat from my friends at Koch Industries.  Gotta go, I&#8217;m already salivating!</p>
]]></content:encoded>
			<wfw:commentRss>http://sambal.org/2011/03/if-we-took-michael-moores-advice/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Lent 2011</title>
		<link>http://sambal.org/2011/03/lent-2011/</link>
		<comments>http://sambal.org/2011/03/lent-2011/#comments</comments>
		<pubDate>Wed, 09 Mar 2011 12:27:51 +0000</pubDate>
		<dc:creator>Sam</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://sambal.org/?p=850</guid>
		<description><![CDATA[Let&#8217;s get Lenten! Woo! I&#8217;m pumped for self-denial! Yahoo!]]></description>
			<content:encoded><![CDATA[<p>Let&#8217;s get Lenten!  Woo!  I&#8217;m pumped for self-denial!  Yahoo!</p>
]]></content:encoded>
			<wfw:commentRss>http://sambal.org/2011/03/lent-2011/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New Kinds of Taxes</title>
		<link>http://sambal.org/2011/03/new-kinds-of-taxes/</link>
		<comments>http://sambal.org/2011/03/new-kinds-of-taxes/#comments</comments>
		<pubDate>Fri, 04 Mar 2011 23:09:13 +0000</pubDate>
		<dc:creator>Sam</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://sambal.org/?p=849</guid>
		<description><![CDATA[Kling: &#8220;One point about the Great Substitution of leisure for work is that leisure escapes taxation. That raises all sorts of issues. &#8221; Non-consumption tax. Video game tax. Sitting around tax. Doing nothing tax. Mental activity tax. Oh wait, that last one is basically thoughtcrime. What, did the US suddenly get Canada envy?]]></description>
			<content:encoded><![CDATA[<p>Kling: &#8220;<a href="http://bit.ly/ft5b9M">One point about the Great Substitution of leisure for work is that leisure escapes taxation. That raises all sorts of issues. </a>&#8221; </p>
<p>Non-consumption tax.  Video game tax.  Sitting around tax.  <a href="http://thesocietypages.org/socimages/2011/03/04/doing-nothing-an-experiment-in-norm-breaking-2/">Doing nothing</a> tax.  <a href="http://www.nationalreview.com/articles/261297/hands-my-mental-activity-rich-lowry">Mental activity</a> tax.</p>
<p>Oh wait, that last one is basically <em>thoughtcrime</em>.  What, did the US suddenly get <a href="http://www.subgenius.com/subg-digest/v5/0169.html">Canada envy</a>?</p>
]]></content:encoded>
			<wfw:commentRss>http://sambal.org/2011/03/new-kinds-of-taxes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New (to me) Language Typology Distinction</title>
		<link>http://sambal.org/2011/03/new-to-me-language-typology-distinction/</link>
		<comments>http://sambal.org/2011/03/new-to-me-language-typology-distinction/#comments</comments>
		<pubDate>Fri, 04 Mar 2011 16:14:18 +0000</pubDate>
		<dc:creator>Sam</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://sambal.org/?p=848</guid>
		<description><![CDATA[I hadn&#8217;t encountered this before: Place-Manner-Time vs. Time-Manner-Place languages, an attribute of the ordering of adpositional phrases. Examples from Wikipedia: English (PMT): I&#8217;m traveling to Munich by car today. German (TMP): Ich fahre heute mit dem Auto nach München. Japanese, which I&#8217;m trying to learn, is a TMP language like German. French and Finnish, which [...]]]></description>
			<content:encoded><![CDATA[<p>I hadn&#8217;t encountered this before: <a href="http://en.wikipedia.org/wiki/Place_Manner_Time">Place-Manner-Time</a> vs. <a href="http://en.wikipedia.org/wiki/Time_Manner_Place">Time-Manner-Place</a> languages, an attribute of the ordering of adpositional phrases.  Examples from Wikipedia:</p>
<p>English (PMT): I&#8217;m traveling to Munich by car today.</p>
<p>German (TMP): Ich fahre heute mit dem Auto nach München.</p>
<p>Japanese, which I&#8217;m trying to learn, is a TMP language like German.  French and Finnish, which I&#8217;ve learned post-childhood are both PMT; and my two childhood languages Czech and English are also both PMT.  (At least I think Czech is PMT; I hardly have any anymore).</p>
]]></content:encoded>
			<wfw:commentRss>http://sambal.org/2011/03/new-to-me-language-typology-distinction/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>No Woman No Cry: You&#8217;re Parsing it Wrong</title>
		<link>http://sambal.org/2011/03/no-woman-no-cry-youre-parsing-it-wrong/</link>
		<comments>http://sambal.org/2011/03/no-woman-no-cry-youre-parsing-it-wrong/#comments</comments>
		<pubDate>Fri, 04 Mar 2011 15:03:26 +0000</pubDate>
		<dc:creator>Sam</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://sambal.org/?p=847</guid>
		<description><![CDATA[It doesn't mean "If you don't have a woman, you won't have to cry".  Which really seemed like the most sensible reading to me.]]></description>
			<content:encoded><![CDATA[<p>I didn&#8217;t realize I&#8217;ve been parsing it wrong all this time.</p>
<p>I thought it was like &#8220;No pain, no gain&#8221;.</p>
<p>Like &#8220;No justice, no peace&#8221;.</p>
<p>Like &#8220;No bishop, no king&#8221;.</p>
<p>Like &#8220;<a href="http://languagelog.ldc.upenn.edu/nll/?p=2351">No latinos, no tacos</a>&#8220;.</p>
<p>But apparently &#8220;No woman no cry&#8221; actually means &#8220;No my dear don&#8217;t cry.&#8221;</p>
]]></content:encoded>
			<wfw:commentRss>http://sambal.org/2011/03/no-woman-no-cry-youre-parsing-it-wrong/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>In Case You Needed A New Time-Waster</title>
		<link>http://sambal.org/2011/03/in-case-you-needed-a-new-time-waster/</link>
		<comments>http://sambal.org/2011/03/in-case-you-needed-a-new-time-waster/#comments</comments>
		<pubDate>Fri, 04 Mar 2011 14:58:28 +0000</pubDate>
		<dc:creator>Sam</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://sambal.org/?p=846</guid>
		<description><![CDATA[At wals.info, compare linguistic features by geography (e.g.,: when do ordinal numbers become productive? first second three+th vs. first, two+th, three+th).]]></description>
			<content:encoded><![CDATA[<p>At <a href="http://wals.info/languoid/lect/wals_code_cze">wals.info</a>, compare linguistic features by geography (e.g.,: when do ordinal numbers become productive? first second three+th vs. first, two+th, three+th).</p>
]]></content:encoded>
			<wfw:commentRss>http://sambal.org/2011/03/in-case-you-needed-a-new-time-waster/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

