<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-8405913371308041445</id><updated>2012-02-16T21:07:41.825-05:00</updated><category term='Fenway'/><category term='linux'/><category term='baseball'/><category term='x.org'/><category term='kwin'/><category term='wiki'/><category term='rt73'/><category term='kubuntu'/><category term='wifi'/><category term='Red Sox'/><category term='licorice'/><category term='perl'/><category term='plucene'/><category term='fail'/><category term='kde'/><title type='text'>29 Reality Street</title><subtitle type='html'>"Reality is nothing more than a collective hunch." -Jane Wagner</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://29realitystreet.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8405913371308041445/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://29realitystreet.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Charlie</name><uri>http://www.blogger.com/profile/06043239881824887794</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://3.bp.blogspot.com/-3dSdvJBTmIg/TVwdNJZcJ7I/AAAAAAAAB8w/0c53wbae0ao/s220/crazed.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>15</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-8405913371308041445.post-6308978073410945249</id><published>2010-05-06T11:16:00.003-04:00</published><updated>2010-05-06T13:54:24.945-04:00</updated><title type='text'>Manitoba / Caribou</title><content type='html'>Shuffle play if you can&lt;br /&gt;&lt;br /&gt;&lt;object height="40" width="250"&gt; &lt;param name="movie" value="http://listen.grooveshark.com/songWidget.swf" /&gt;&lt;param name="wmode" value="window" /&gt;&lt;param name="allowScriptAccess" value="always" /&gt;&lt;param name="flashvars" value="hostname=cowbell.grooveshark.com&amp;amp;widgetID=21059898&amp;amp;style=metal&amp;amp;p=0" /&gt;&lt;embed src="http://listen.grooveshark.com/songWidget.swf" type="application/x-shockwave-flash" width="250" height="40" flashvars="hostname=cowbell.grooveshark.com&amp;amp;widgetID=21059898&amp;amp;style=metal&amp;amp;p=0" allowScriptAccess="always" wmode="window" /&gt;&lt;/object&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://en.wikipedia.org/wiki/Caribou_(musician)"&gt;http://en.wikipedia.org/wiki/Caribou_(musician)&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Here, this should give fuller access: &lt;a href="http://listen.grooveshark.com/#/playlist/Caribou+and+Manitoba/28697287"&gt;http://listen.grooveshark.com/#/playlist/Caribou+and+Manitoba/28697287&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8405913371308041445-6308978073410945249?l=29realitystreet.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://29realitystreet.blogspot.com/feeds/6308978073410945249/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://29realitystreet.blogspot.com/2010/05/manitoba-caribou.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8405913371308041445/posts/default/6308978073410945249'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8405913371308041445/posts/default/6308978073410945249'/><link rel='alternate' type='text/html' href='http://29realitystreet.blogspot.com/2010/05/manitoba-caribou.html' title='Manitoba / Caribou'/><author><name>Charlie</name><uri>http://www.blogger.com/profile/06043239881824887794</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://3.bp.blogspot.com/-3dSdvJBTmIg/TVwdNJZcJ7I/AAAAAAAAB8w/0c53wbae0ao/s220/crazed.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8405913371308041445.post-4299176586002677743</id><published>2010-04-01T14:34:00.003-04:00</published><updated>2010-04-01T14:37:30.186-04:00</updated><title type='text'>Perl bitwise string operators</title><content type='html'>&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;I have had a long-standing and confusing problem in the mod_perl intranet site I develop. An integer intended to be used as a bitmask, and retrieved from a &lt;/span&gt;&lt;a href="http://search.cpan.org/~pmqs/DB_File-1.820/DB_File.pm"&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;DB_File&lt;/span&gt;&lt;/a&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt; database via &lt;/span&gt;&lt;a href="http://search.cpan.org/~chorny/MLDBM-2.04/lib/MLDBM.pm"&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;MLDBM&lt;/span&gt;&lt;/a&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;, seemed to be intermittenly fluctuating in value. I had been focusing my efforts on what was going on way down inside the DB layer, but the problem was like in circuit debugging when the touch of the oscilloscope probe stops the oscillation you're trying to observe with the oscilloscope. &amp;nbsp;Adding instrumentation code sometimes changed nothing, sometimes made the problem go away, and sometimes changed the observed bad behavior.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;Finally, getting nowhere with that approach, but still believing that the problem was in the DB layer (or MLDBM), I decided just to replace that section with &lt;/span&gt;&lt;a href="http://search.cpan.org/~sprout/DBM-Deep-1.0016/lib/DBM/Deep.pod"&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;DBM::Deep&lt;/span&gt;&lt;/a&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;.&amp;nbsp;I had been wanting to start using it anyway. Luckily it was easy because I wrote that interface code &lt;/span&gt;&lt;i&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;after&lt;/span&gt;&lt;/i&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&amp;nbsp;I learned to modularize, so I only had to change a couple of functions deep in my library.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;Of course the problem survived the code transplant, so I started looking at the few bits of suspect code left, when I came across this in something I wrote long long ago (variable names have been changed to protect the innocent; I don't really use names like that in my code :-P ):&lt;/span&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt; $hashref-&amp;gt;{key} |= $fluctuating_val;&lt;/span&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;$hashref was also tied to MLDBM, which is why I had been concentrating on that subsystem. In any case, I started following $fluctuating_val around using &lt;/span&gt;&lt;a href="http://search.cpan.org/~dapm/perl-5.10.1/ext/Devel-Peek/Peek.pm"&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;Devel::Peek&lt;/span&gt;&lt;/a&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&amp;nbsp;instead of just printing the value itself. Voilà! $fluctuating_val was coming from MLDBM as a PV (string value), and so was $hashref-&amp;gt;{key}, and the bitwise operation wasn't giving the expected result. . But I found that the bitwise operation sometimes succeeded when I added debugging print statements. This started to make sense to me when looking with Devel::Peek, because one can follow the internal state of a Perl variable and see it accumulate different kinds of values as it is used in different contexts. One-liner demo:&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: monospace;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Times New Roman';"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;code&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt; % perl -e 'use Devel::Peek; my $i="1234"; printf "%s\n",$i; Dump($i); printf "%d\n",$i; Dump($i);'&lt;br /&gt;1234&lt;br /&gt;SV = PV(0x8154b00) at 0x8154714&lt;br /&gt;&amp;nbsp;REFCNT = 1&lt;br /&gt;&amp;nbsp;FLAGS = (PADBUSY,PADMY,POK,pPOK)&lt;br /&gt;&amp;nbsp;PV = 0x8169758 "1234"\0&lt;br /&gt;&amp;nbsp;CUR = 4&lt;br /&gt;&amp;nbsp;LEN = 8&lt;br /&gt;1234&lt;br /&gt;SV = PVIV(0x8155b10) at 0x8154714&lt;br /&gt;&amp;nbsp;REFCNT = 1&lt;br /&gt;&amp;nbsp;FLAGS = (PADBUSY,PADMY,IOK,POK,pIOK,pPOK)&lt;br /&gt;&amp;nbsp;IV = 1234&lt;br /&gt;&amp;nbsp;PV = 0x8169758 "1234"\0&lt;br /&gt;&amp;nbsp;CUR = 4&lt;br /&gt;&amp;nbsp;LEN = 8&lt;/span&gt; &lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;$i acquires an integer value (IV) when it is accessed as an integer. &amp;nbsp;That is the way Perl variables are supposed to work. &amp;nbsp;But what if we access the variable with a bitwise operator?&lt;/span&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt; % perl -e 'use Devel::Peek; my $i="1234"; $i|="5678"; printf "%s\n", $i; Dump($i);'&lt;br /&gt;567&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&lt;sv 0x8154714="" at=""&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;SV = PV(0x8154b00) at 0x8154714&lt;/span&gt; &lt;code&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;REFCNT = 1&lt;/span&gt;&lt;/code&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt; &lt;code&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;FLAGS = (PADBUSY,PADMY,POK,pPOK)&lt;/span&gt;&lt;/code&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt; &lt;code&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;PV = 0x8169748 "567&amp;lt;"\0&lt;/span&gt;&lt;/code&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt; &lt;code&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;CUR = 4&lt;/span&gt;&lt;/code&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt; &lt;code&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;LEN = 8 &lt;/span&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt; The result of the operation between two PVs is another PV, and the value is not 1234|5678 = 0x4D2|0x162E = 0x16FE = 5886, which is the value I expected. But what if one operand has a numeric value?&lt;/span&gt;&lt;/sv&gt;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&lt;sv 0x8154714="" at=""&gt; &lt;code&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt; % perl -e 'use Devel::Peek; my $i="1234"; $i|=5678; printf "%s\n", $i; Dump($i);'&lt;br /&gt;5886&lt;br /&gt;SV = PVIV(0x8155b10) at 0x8154714&lt;br /&gt;&amp;nbsp;REFCNT = 1&lt;br /&gt;&amp;nbsp;FLAGS = (PADBUSY,PADMY,IOK,POK,pIOK,pPOK)&lt;br /&gt;&amp;nbsp;IV = 5886&lt;br /&gt;&amp;nbsp;PV = 0x8169748 "5886"\0&lt;br /&gt;&amp;nbsp;CUR = 4&lt;br /&gt;&amp;nbsp;LEN = 8&lt;/span&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&amp;nbsp;A PVIV!  It behaves differently! And in the way that I want! I changed my problem code to&lt;/span&gt;&lt;/sv&gt;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&lt;sv 0x8154714="" at=""&gt;&lt;code&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt; &lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt; $hashref-&amp;gt;{key} |= 1*$fluctuating_val;&lt;/span&gt;&lt;br /&gt;&lt;/code&gt; &lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt; and voilà! again.  My problem disappeared, because multiplying by 1 gave the variable an internal numerical value, making the bitwise operator reach the answer I was expecting.&lt;/span&gt;&lt;/sv&gt;&lt;/code&gt;&lt;/div&gt;&lt;code&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt; &lt;/code&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;code&gt;&lt;/code&gt;&lt;/span&gt;&lt;br /&gt;&lt;code&gt;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;But why? I started Google searching:&amp;nbsp;&lt;/span&gt;&lt;a href="http://www.google.com/search?hl=en&amp;amp;q=perl+bitwise+pv+iv"&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;http://www.google.com/search?hl=en&amp;amp;q=perl+bitwise+pv+iv&lt;/span&gt;&lt;/a&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;, which led me to a stackoverflow post entitled "&lt;/span&gt;&lt;a href="http://stackoverflow.com/questions/330878/how-does-perl-decide-to-treat-a-scalar-as-a-string-or-a-number"&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;How does Perl decide to treat a scalar as a string or a number?&lt;/span&gt;&lt;/a&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;", and a comment made by Leon Timmermans inside it:&lt;/span&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;span class="Apple-style-span" style="border-collapse: collapse; color: #444444; font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; font-size: 13px; line-height: 17px;"&gt;Perl [remembers] when a variable is both a valid integer, float or string when either of those is used.&lt;/span&gt;&lt;span class="Apple-style-span" style="border-collapse: collapse; color: #444444; font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; font-size: 13px; line-height: 17px;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="Apple-style-span" style="border-collapse: collapse; color: #444444; font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; font-size: 13px; line-height: 17px;"&gt;&lt;i style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 13px; font-style: italic; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;However this does not affect the semantics of the variable&lt;/i&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="border-collapse: collapse; color: #444444; font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; font-size: 13px; line-height: 17px;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="Apple-style-span" style="border-collapse: collapse; color: #444444; font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; font-size: 13px; line-height: 17px;"&gt;(except in two cases, bitwise operators and syscall). –&amp;nbsp;&lt;/span&gt;&lt;span class="Apple-style-span" style="border-collapse: collapse; color: #444444; font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; font-size: 13px; line-height: 17px;"&gt;&lt;a class="comment-user" href="http://www.blogger.com/users/4727/leon-timmermans" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #4a6b82; cursor: pointer; font-size: 13px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline; white-space: nowrap;" title="14500"&gt;Leon Timmermans&lt;/a&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="border-collapse: collapse; color: #444444; font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; font-size: 13px; line-height: 17px;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="Apple-style-span" style="border-collapse: collapse; color: #444444; font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; font-size: 13px; line-height: 17px;"&gt;&lt;span class="comment-date" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #999999; font-size: 13px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;&lt;span style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 13px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;" title="2008-12-01 16:08:46Z"&gt;Dec 1 '08 at 16:08&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;Bingo. &amp;nbsp;But how are bitwise operators different? I emailed him to ask, and he helpfully pointed me to the &lt;/span&gt;&lt;a href="http://perldoc.perl.org/perlop.html"&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;perlop manpage&lt;/span&gt;&lt;/a&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&amp;nbsp;(duh!), specifically a section near the bottom called &lt;/span&gt;&lt;a href="http://perldoc.perl.org/perlop.html#Bitwise-String-Operators"&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;Bitwise String Operators&lt;/span&gt;&lt;/a&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;, which says&lt;/span&gt;&lt;br /&gt;&lt;blockquote&gt;If you are intending to manipulate bitstrings, be certain that you're supplying bitstrings: If an operand is a number, that will imply a numeric bitwise operation. You may explicitly show which type of operation you intend by using "" or 0+ .&lt;/blockquote&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;Turns out 1* works too. This is the first time I've thought about additive and multiplicative identities in who knows how long.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;Leon offered this comment in his reply to my email:&lt;/span&gt;&lt;br /&gt;&lt;blockquote&gt;This is generally&amp;nbsp;considered dubious behavior, and in Perl 6 string and integral&amp;nbsp;bit-operators will be split, just like all other string and numeric&amp;nbsp;operators. For now, we'll have to live with it though.&lt;/blockquote&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;Big thanks to Leon (&lt;/span&gt;&lt;a href="http://search.cpan.org/~leont/"&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;http://search.cpan.org/~leont/&lt;/span&gt;&lt;/a&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;).&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8405913371308041445-4299176586002677743?l=29realitystreet.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://29realitystreet.blogspot.com/feeds/4299176586002677743/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://29realitystreet.blogspot.com/2010/04/perl-bitwise-string-operators.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8405913371308041445/posts/default/4299176586002677743'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8405913371308041445/posts/default/4299176586002677743'/><link rel='alternate' type='text/html' href='http://29realitystreet.blogspot.com/2010/04/perl-bitwise-string-operators.html' title='Perl bitwise string operators'/><author><name>Charlie</name><uri>http://www.blogger.com/profile/06043239881824887794</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://3.bp.blogspot.com/-3dSdvJBTmIg/TVwdNJZcJ7I/AAAAAAAAB8w/0c53wbae0ao/s220/crazed.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8405913371308041445.post-4130760282070660339</id><published>2009-10-05T12:43:00.002-04:00</published><updated>2009-10-15T12:56:26.881-04:00</updated><title type='text'>rooting my G1</title><content type='html'>&lt;a href="http://www.blogger.com/"&gt;&lt;/a&gt;&lt;span id="goog_1255613212458"&gt;&lt;/span&gt;&lt;span id="goog_1255613212459"&gt;&lt;/span&gt;I had been resisting rooting my T-Mobile G1 Android phone, but finally tiring of the sluggish performance of the hardware, and encouraged by Twitter friend &lt;a href="http://twitter.com/cym0n"&gt;@cym0n&lt;/a&gt;&amp;nbsp;and &lt;a href="http://lifehacker.com/5342237/five-great-reasons-to-root-your-android-phone"&gt;this article&lt;/a&gt;, I decided to do it. It took a while to collect all the information I needed and get it done, but I managed. &amp;nbsp;I chose to use&amp;nbsp;&lt;a href="http://forum.xda-developers.com/showthread.php?t=537204)"&gt;CyanogenMod&amp;nbsp;4.0.4&lt;/a&gt;. &amp;nbsp;I think it's no longer available because of the &lt;a href="http://www.cyanogenmod.com/home/the-current-state"&gt;Google C&amp;amp;D&lt;/a&gt; issue, but I'll summarize anyway. &amp;nbsp;I basically followed &lt;a href="http://twitter.com/RyeBrye"&gt;RyeBrye&lt;/a&gt;'s article "&lt;a href="http://www.ryebrye.com/blog/2009/08/16/android-rooting-in-1-click-in-progress/"&gt;Android Rooting in 1-click&lt;/a&gt;".&lt;br /&gt;&lt;ul&gt;&lt;li&gt;backed up the contents of the SD card&lt;/li&gt;&lt;li&gt;recorded all the settings I wanted to reapply (WiFi passwords, notification ringtones, etc.)&lt;/li&gt;&lt;li&gt;installed Recovery Flasher (I got it from&amp;nbsp;&lt;a href="http://g1files.webs.com/Zinx/flashrec-20090815.apk"&gt;http://g1files.webs.com/Zinx/flashrec-20090815.apk&lt;/a&gt;, which may or may not still work)&lt;/li&gt;&lt;li&gt;ran Recovery Flasher, "reboot to recovery mode"&lt;/li&gt;&lt;li&gt;partition the (8GB) SD card following&amp;nbsp;&lt;a href="http://androidandme.com/2009/08/news/how-to-manually-partition-your-sd-card-for-android-apps2sd/"&gt;http://androidandme.com/2009/08/news/how-to-manually-partition-your-sd-card-for-android-apps2sd/&lt;/a&gt;. I chose to use a 1GB ext4 partition for the apps2sd section, so my partition table looks like this (via parted run from adb shell):&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="font-family: monospace;"&gt;Number &amp;nbsp;Start &amp;nbsp; End &amp;nbsp; &amp;nbsp; Size &amp;nbsp; &amp;nbsp;Type &amp;nbsp; &amp;nbsp; File system &amp;nbsp; &amp;nbsp; Flags&lt;br /&gt;&amp;nbsp;1 &amp;nbsp; &amp;nbsp; &amp;nbsp;32.3kB &amp;nbsp;6893MB &amp;nbsp;6893MB &amp;nbsp;primary &amp;nbsp;fat32 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; lba&lt;br /&gt;&amp;nbsp;2 &amp;nbsp; &amp;nbsp; &amp;nbsp;6893MB &amp;nbsp;7916MB &amp;nbsp;1023MB &amp;nbsp;primary &amp;nbsp;ext4&lt;br /&gt;&amp;nbsp;3 &amp;nbsp; &amp;nbsp; &amp;nbsp;7916MB &amp;nbsp;7948MB &amp;nbsp;32.2MB &amp;nbsp;primary &amp;nbsp;linux-swap(v1)&lt;br /&gt;&lt;span style="font-family: 'Times New Roman';"&gt;&lt;span style="font-family: monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;ran Recovery Flasher again, downloaded CyanogenMod 4.0.4 image, "Back up Recovery image", and rebooted to recovery mode&lt;/li&gt;&lt;li&gt;at recovery screen, run "nandroid backup"&lt;/li&gt;&lt;li&gt;run "wipe data"&lt;/li&gt;&lt;li&gt;run "Apply any zip from SD", select CyanogenMod image&lt;/li&gt;&lt;li&gt;reboot&lt;/li&gt;&lt;li&gt;download&amp;nbsp;&lt;a href="http://n0rp.chemlab.org/android/audio-resources.zip"&gt;http://n0rp.chemlab.org/android/audio-resources.zip&lt;/a&gt;&amp;nbsp;and copy its contents to the root directory of the SD card&lt;/li&gt;&lt;li&gt;reinstalled apps from the market&lt;/li&gt;&lt;li&gt;got the MyFaves.apk file and installed it (don't quite remember where I got it; maybe &lt;a href="http://forums.t-mobile.com/tmbl/board/message?board.id=AndroidDev&amp;amp;thread.id=8101"&gt;here&lt;/a&gt;?)&lt;/li&gt;&lt;li&gt;installed "Overclock Widget" from the market and set it for 528 (screen on) and 128 (screen off)&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;And that pretty much got it going. &amp;nbsp;It didn't go as smoothly as this summary indicates; I had to retry a number of things until I got it figured out.&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;If I were doing this again, one thing I would do differently would be to use ASTRO or something like that to back up all the apps to the SD card, which would make reinstalling them a lot easier. &amp;nbsp;Especially now that I have learned to use adb from the Android SDK.&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The phone has been much more fun to use since rooting.&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8405913371308041445-4130760282070660339?l=29realitystreet.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://29realitystreet.blogspot.com/feeds/4130760282070660339/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://29realitystreet.blogspot.com/2009/10/rooting-my-g1.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8405913371308041445/posts/default/4130760282070660339'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8405913371308041445/posts/default/4130760282070660339'/><link rel='alternate' type='text/html' href='http://29realitystreet.blogspot.com/2009/10/rooting-my-g1.html' title='rooting my G1'/><author><name>Charlie</name><uri>http://www.blogger.com/profile/06043239881824887794</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://3.bp.blogspot.com/-3dSdvJBTmIg/TVwdNJZcJ7I/AAAAAAAAB8w/0c53wbae0ao/s220/crazed.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8405913371308041445.post-4017653975445640039</id><published>2009-09-07T14:51:00.000-04:00</published><updated>2009-09-07T14:52:05.520-04:00</updated><title type='text'>culinary reference books</title><content type='html'>I like to keep a lot of reference books in my house. Perhaps this goes back to the pre-world-wide-web days, but even with the existence of Wikipedia, having a shelf full of answers is still satisfying.  The largest sub-category in my reference library is Food &amp;amp; Drink, constituting a separate section of the kitchen bookshelf from the cookbooks.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://books.google.com/books?id=AppgwYOwleYC&amp;amp;q=food+lover%27s+companion&amp;amp;dq=food+lover%27s+companion&amp;amp;ei=iFKlSsSJGZmSywTH9Y37Bw"&gt;The New Food Lover's Companion&lt;/a&gt;&lt;br /&gt;This is a fantastic book and makes a great gift for the food-inclined.  My copy is actually the 2nd edition, entitled just "The Food Lover's Companion".  There is so much useful information in here it's hard to even summarize it.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://books.google.com/books?id=6S--wG3pYZoC&amp;amp;q=food+lover%27s+companion&amp;amp;dq=food+lover%27s+companion&amp;amp;source=gbs_similarbooks_s&amp;amp;cad=1"&gt;On Food and Cooking&lt;/a&gt;&lt;br /&gt;Harold McGee's classic reference on the science and history of all kinds of food and cooking techniques.  Want to know why it's helpful to keep pastry dough cold?  This is the place to check.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://books.google.com/books?id=TmRuoa40mQgC&amp;amp;dq=cheese+primer&amp;amp;source=gbs_navlinks_s"&gt;Cheese Primer&lt;/a&gt;&lt;span style="text-decoration: underline;"&gt;&lt;br /&gt;&lt;/span&gt;Steven Jenkins explains it all.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://books.google.com/books?id=Ad4fvl72AogC&amp;amp;dq=windows+on+the+world&amp;amp;source=gbs_navlinks_s"&gt;Windows on the World Complete Wine Course&lt;/a&gt;&lt;br /&gt;I always go to Kevin Zraly with my amateurish wine questions.  My copy is the original edition from 1985! Time for an update?&lt;br /&gt;&lt;br /&gt;Beer?&lt;br /&gt;Somehow I find myself without a reference book on beer, despite its place in my life as my favorite beverage.  Can you recommend an addition to my bookshelf to fill this gaping hole?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8405913371308041445-4017653975445640039?l=29realitystreet.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://29realitystreet.blogspot.com/feeds/4017653975445640039/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://29realitystreet.blogspot.com/2009/06/culinary-reference-books.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8405913371308041445/posts/default/4017653975445640039'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8405913371308041445/posts/default/4017653975445640039'/><link rel='alternate' type='text/html' href='http://29realitystreet.blogspot.com/2009/06/culinary-reference-books.html' title='culinary reference books'/><author><name>Charlie</name><uri>http://www.blogger.com/profile/06043239881824887794</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://3.bp.blogspot.com/-3dSdvJBTmIg/TVwdNJZcJ7I/AAAAAAAAB8w/0c53wbae0ao/s220/crazed.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8405913371308041445.post-7843773474239539053</id><published>2009-08-13T14:37:00.019-04:00</published><updated>2009-08-20T22:49:40.592-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='wiki'/><category scheme='http://www.blogger.com/atom/ns#' term='plucene'/><category scheme='http://www.blogger.com/atom/ns#' term='perl'/><title type='text'>debugging a memory leak in a Perl module</title><content type='html'>I needed to add a (small) wiki to the intranet web site I develop (in Perl) for work.  Some customization and integration with the existing site was required, so I couldn't just drop in a standalone wiki package. But I also didn't want to roll my own from scratch.  I settled on using &lt;a href="http://search.cpan.org/%7Edom/Wiki-Toolkit-0.77/lib/Wiki/Toolkit.pm"&gt;Wiki::Toolkit&lt;/a&gt; from CPAN because it takes care of all the low-level details and includes an interface to &lt;a href="http://www.sqlite.org/"&gt;SQLite&lt;/a&gt;, which I'm already using for a number of other purposes in the site.&lt;br /&gt;&lt;br /&gt;A crucial requirement for this wiki is full-text searching. Wiki::Toolkit provides interfaces to three different search backends:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://search.cpan.org/%7Etjmather/DBIx-FullTextSearch-0.73/lib/DBIx/FullTextSearch.pm"&gt;DBIx::FullTextSearch&lt;/a&gt; - Uses MySQL to index.  I chose not to use this because I don't have a MySQL installation and because this backend doesn't provide fuzzy searching, which I would like to use.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://search.cpan.org/%7Esnowhare/Search-InvertedIndex-1.14/lib/Search/InvertedIndex.pm"&gt;Search::InvertedIndex&lt;/a&gt; - Can use different databases, including SQLite, but doesn't provide phrase searching, which I definitely need.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://search.cpan.org/%7Etmtm/Plucene-1.25/lib/Plucene.pm"&gt;Plucene&lt;/a&gt; - A Perl interface to the &lt;a href="http://lucene.apache.org/java/docs/index.html"&gt;Lucene&lt;/a&gt; search engine. Provides both fuzzy searching and phrase searching.  I decided to use this.&lt;/li&gt;&lt;/ul&gt;I have since learned that this might not have been the best idea, due to performance concerns:&lt;br /&gt;&lt;a href="http://perlbuzz.com/mechanix/2008/03/dont-use-plucene-for-real-work.html"&gt;http://perlbuzz.com/mechanix/2008/03/dont-use-plucene-for-real-work.html&lt;/a&gt;.  Perhaps I should have tried KinoSearch.  But I still would have needed to write a plugin for Wiki::Toolkit to incorporate it.  And it turns out my wiki database is small enough that the Plucene performance hit isn't noticeable, so Plucene it is.&lt;br /&gt;&lt;br /&gt;Except for one complication. Following is a condensed version of the learning process I went through in trying to resolve the complication.  I've intentionally written this a bit pedantically to remind myself about the tools and concepts I learned about along the way.&lt;br /&gt;&lt;br /&gt;Once I got the search function running, I began getting errors in the form of "Too many files open".  It turned out there was a filehandle leak somewhere in the Plucene modules.  The filehandles were being opened in Plucene::Store::InputStream, then never closed.  Tracing the Plucene::Store::InputStream objects, I found they were never getting destroyed, hence the leak.  Thus commenced a brute-force examination of the Plucene modules, figuring out which object contained which object, so I could eventually track down which object wasn't going out of scope.  This approach didn't get me very far.&lt;br /&gt;&lt;br /&gt;Then, a breakthrough! Playing with the system, I realized that the leak only occurred when I was searching for multiple terms.  I started overriding various Plucene library methods to produce stack dumps at various helpful places.  This way I determined that Plucene constructs queries for single terms using Plucene::Search::TermQuery, but when there are multiple terms connected with AND / OR, it uses Plucene::Search::BooleanQuery.  This narrowed down the list of suspects quite dramatically, and I confirmed the diagnosis using Adam Kennedy's &lt;a href="http://search.cpan.org/%7Eadamk/Devel-Leak-Object-0.92/lib/Devel/Leak/Object.pm"&gt;Devel::Leak::Object&lt;/a&gt; to examine the objects remaining when my test program (written to demonstrate the problem) exits:&lt;br /&gt;&lt;pre style="font-family:courier new;"&gt;&lt;br /&gt;Plucene::Index::FieldInfo                720&lt;br /&gt;Plucene::Index::FieldInfos               120&lt;br /&gt;Plucene::Index::FieldsReader             120&lt;br /&gt;Plucene::Index::Norm                     600&lt;br /&gt;Plucene::Index::SegmentReader            120&lt;br /&gt;Plucene::Index::SegmentTermDocs          240&lt;br /&gt;Plucene::Index::SegmentTermEnum          120&lt;br /&gt;Plucene::Index::SegmentsTermDocs         16&lt;br /&gt;Plucene::Index::Term                     3152&lt;br /&gt;Plucene::Index::TermInfo                 3016&lt;br /&gt;Plucene::Index::TermInfosReader          120&lt;br /&gt;Plucene::Search::BooleanScorer           8&lt;br /&gt;Plucene::Search::BucketCollector         16&lt;br /&gt;Plucene::Search::BucketTable             8&lt;br /&gt;Plucene::Search::TermScorer              16&lt;br /&gt;Plucene::Store::InputStream              960&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Of particular interest is the fact that the test program executes the search in a fixed length loop; in the case that produced this output there were 8 iterations, and &lt;span style="font-size:100%;"&gt; there are (rather suggestively) 8 each of the Plucene::Search::{BooleanScorer,BucketTable} objects.  Looking at the code I found that the Plucene::Search::BooleanQuery object contains the BooleanScorer object, which contains the BucketTable object, which points back to the BooleanScorer object!  Sure enough, the circular references are revealed using Lincoln Stein's &lt;a href="http://search.cpan.org/%7Elds/Devel-Cycle-1.10/lib/Devel/Cycle.pm"&gt;Devel::Cycle&lt;/a&gt;:&lt;br /&gt;&lt;pre style="font-family:courier new;"&gt;&lt;br /&gt;Cycle (1):&lt;/span&gt;&lt;br /&gt;$Plucene::Search::BooleanScorer::A-&gt;{'bucket_table'}&lt;br /&gt;         =&gt; \%Plucene::Search::BucketTable::B&lt;br /&gt;$Plucene::Search::BucketTable::B-&gt;{'scorer'}&lt;br /&gt;         =&gt; \%Plucene::Search::BooleanScorer::A&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Knowing this, how do I fix it? I played with it a bit, attempting to figure out when the objects are supposed to be destroyed, and manually undefining them.  But then I found this: &lt;a href="http://www.perl.com/pub/a/2007/06/07/better-code-through-destruction.html"&gt;http://www.perl.com/pub/a/2007/06/07/better-code-through-destruction.html&lt;/a&gt;.  &lt;a href="http://search.cpan.org/%7Eadamk/Object-Destroyer-2.00/lib/Object/Destroyer.pm"&gt;Object::Destroyer&lt;/a&gt; (Adam Kennedy again!) to the rescue!&lt;br /&gt;&lt;br /&gt;&lt;pre style="font-family: courier new;"&gt;&lt;br /&gt;# Plucene::Search::BooleanScorer has circular references that cause a&lt;br /&gt;# memory leak in this persistent mod_perl setting. Override the&lt;br /&gt;# constructor to add Object::Destroyer which will break the circular&lt;br /&gt;# references&lt;br /&gt;require Plucene::Search::BooleanScorer;&lt;br /&gt;use Object::Destroyer;&lt;br /&gt;&lt;br /&gt;*Plucene::Search::BooleanScorer::release = sub {&lt;br /&gt;  my $self = shift;&lt;br /&gt;  $self-&gt;bucket_table-&gt;scorer(undef);&lt;br /&gt;  $self-&gt;bucket_table(undef);&lt;br /&gt;};&lt;br /&gt;&lt;br /&gt;my $old_PSBnew = \&amp;amp;Plucene::Search::BooleanScorer::new;&lt;br /&gt;*Plucene::Search::BooleanScorer::new = sub {&lt;br /&gt;  my $result = $old_PSBnew-&gt;(@_);&lt;br /&gt;  return Object::Destroyer-&gt;new($result, 'release');&lt;br /&gt;};&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;It is so convenient to be able to modify / insert Perl library methods this way so one doesn't have to edit the source or use local copies.  Learning about Perl symbol tables has served me well.&lt;br /&gt;&lt;br /&gt;I filed a &lt;a href="https://rt.cpan.org/Ticket/Display.html?id=48689"&gt;bug report&lt;/a&gt; for Plucene, with an example patch to Plucene/Search/BooleanScorer.pm.  I don't know how useful it will be, but I figured I should share what I've learned in case it's useful to someone.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8405913371308041445-7843773474239539053?l=29realitystreet.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://29realitystreet.blogspot.com/feeds/7843773474239539053/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://29realitystreet.blogspot.com/2009/08/debugging-memory-leak-in-perl-module.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8405913371308041445/posts/default/7843773474239539053'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8405913371308041445/posts/default/7843773474239539053'/><link rel='alternate' type='text/html' href='http://29realitystreet.blogspot.com/2009/08/debugging-memory-leak-in-perl-module.html' title='debugging a memory leak in a Perl module'/><author><name>Charlie</name><uri>http://www.blogger.com/profile/06043239881824887794</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://3.bp.blogspot.com/-3dSdvJBTmIg/TVwdNJZcJ7I/AAAAAAAAB8w/0c53wbae0ao/s220/crazed.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8405913371308041445.post-3866209673911179838</id><published>2009-07-29T12:41:00.007-04:00</published><updated>2009-07-29T14:01:29.183-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='rt73'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='wifi'/><title type='text'>Edimax EW-7318USg USB WiFi adapter working with Linux</title><content type='html'>I wanted to experiment with a WiFi adapter on my desktop Linux box (Kubuntu 8.04), and I chose the &lt;a href="http://www.edimax.com/en/produce_detail.php?pd_id=8&amp;amp;pl1_id=1&amp;amp;pl2_id=44"&gt;Edimax EW-7318USg&lt;/a&gt; USB stick which is reported all over the web to work well under Linux.  Of course it didn't for me.&lt;br /&gt;&lt;br /&gt;I followed the procedure described in an &lt;a href="http://ubuntuforums.org/showthread.php?t=836577"&gt;Ubuntu forum thread&lt;/a&gt; to build the rt73 driver.  That worked fine, but when I plugged in the adapter, it seemed that the system failed to recognize it as a network adapter:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;span style="font-family:courier new;"&gt;Jul 29 12:35:31 encona kernel: [80244.903574] usb 5-8: new high speed USB device using ehci_hcd and address 12&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;Jul 29 12:35:32 encona kernel: [80245.174467] usb 5-8: configuration #1 chosen from 1 choice&lt;/span&gt;&lt;br /&gt;&lt;/blockquote&gt;I ended up learning a bunch about udev and sysfs, and found that the adapter didn't seem to be reporting its MAC address:&lt;br /&gt;&lt;blockquote style="font-family: courier new;"&gt;&lt;br /&gt;looking at parent device '/devices/pci0000:00/0000:00:1d.7/usb5/5-8':&lt;br /&gt;  KERNELS=="5-8"&lt;br /&gt;  SUBSYSTEMS=="usb"&lt;br /&gt;  DRIVERS=="usb"&lt;br /&gt;  ATTRS{dev}=="189:522"&lt;br /&gt;  ATTRS{configuration}==""&lt;br /&gt;  ATTRS{bNumInterfaces}==" 1"&lt;br /&gt;  ATTRS{bConfigurationValue}=="1"&lt;br /&gt;  ATTRS{bmAttributes}=="80"&lt;br /&gt;  ATTRS{bMaxPower}=="300mA"&lt;br /&gt;  ATTRS{urbnum}=="9"&lt;br /&gt;  ATTRS{idVendor}=="7392"&lt;br /&gt;  ATTRS{idProduct}=="7318"&lt;br /&gt;  ATTRS{bcdDevice}=="0001"&lt;br /&gt;  ATTRS{bDeviceClass}=="00"&lt;br /&gt;  ATTRS{bDeviceSubClass}=="00"&lt;br /&gt;  ATTRS{bDeviceProtocol}=="00"&lt;br /&gt;  ATTRS{bNumConfigurations}=="1"&lt;br /&gt;  ATTRS{bMaxPacketSize0}=="64"&lt;br /&gt;  ATTRS{speed}=="480"&lt;br /&gt;  ATTRS{busnum}=="5"&lt;br /&gt;  ATTRS{devnum}=="11"&lt;br /&gt;  ATTRS{version}==" 2.00"&lt;br /&gt;  ATTRS{maxchild}=="0"&lt;br /&gt;  ATTRS{quirks}=="0x0"&lt;br /&gt;  ATTRS{authorized}=="1"&lt;br /&gt;  ATTRS{manufacturer}=="Ralink"&lt;br /&gt;  ATTRS{product}=="802.11 bg WLAN"&lt;/blockquote&gt;So I thought, aha! maybe there is something wrong with the adapter! How can the system know that it's a network adapter without a MAC address?  There should be an ATTRS{address} entry!&lt;br /&gt;&lt;br /&gt;I tried installing this thing on my Macbook, with the same problem.  I was really starting to think that there was a hardware problem, since it failed to work on two different operating systems.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;But my guess was wrong.  In continued research, I happened across a post on &lt;a href="http://www.electricshaman.com/"&gt;Electric Shaman&lt;/a&gt;  describing exactly this problem: &lt;a href="http://www.electricshaman.com/2009/07/17/edimax-ew-7318usg/"&gt;&lt;span style="font-size:100%;"&gt;Edimax EW-7318USg with the RT73 Enhanced Driver&lt;/span&gt;&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Duh.  The driver didn't know the vendor id and product id.  I added that in like Jeff suggested and rebuilt the driver.  It's working now.  Thanks Jeff.&lt;br /&gt;&lt;br /&gt;I believe the reason it didn't work on my Macbook is that I installed the driver off the CD, which perhaps also doesn't know the (presumably) new IDs.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.electricshaman.com/2009/07/17/edimax-ew-7318usg/"&gt;&lt;span style="font-size:100%;"&gt;&lt;/span&gt;&lt;/a&gt;&lt;h1 style="font-weight: normal;"&gt;&lt;/h1&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8405913371308041445-3866209673911179838?l=29realitystreet.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://29realitystreet.blogspot.com/feeds/3866209673911179838/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://29realitystreet.blogspot.com/2009/07/edimax-ew-7318usg-usb-wifi-adapter.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8405913371308041445/posts/default/3866209673911179838'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8405913371308041445/posts/default/3866209673911179838'/><link rel='alternate' type='text/html' href='http://29realitystreet.blogspot.com/2009/07/edimax-ew-7318usg-usb-wifi-adapter.html' title='Edimax EW-7318USg USB WiFi adapter working with Linux'/><author><name>Charlie</name><uri>http://www.blogger.com/profile/06043239881824887794</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://3.bp.blogspot.com/-3dSdvJBTmIg/TVwdNJZcJ7I/AAAAAAAAB8w/0c53wbae0ao/s220/crazed.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8405913371308041445.post-8153254826672406689</id><published>2009-07-13T12:25:00.009-04:00</published><updated>2009-07-13T12:41:06.530-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='kde'/><category scheme='http://www.blogger.com/atom/ns#' term='kwin'/><title type='text'>kwin memory leak confirmed?</title><content type='html'>&lt;span class="Apple-style-span"  style="font-size:small;"&gt;I think it's pretty much confirmed that my problem is indeed due to a memory leak in kwin. I've been running a cron job every minute to gather memory usage information on kwin. The result:&lt;/span&gt;&lt;div&gt;&lt;br /&gt;&lt;div&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_KcbXplbfPcw/SltgkovKskI/AAAAAAAABN8/sWZjSRO2HnA/s1600-h/xmem.png"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 387px; height: 400px;" src="http://2.bp.blogspot.com/_KcbXplbfPcw/SltgkovKskI/AAAAAAAABN8/sWZjSRO2HnA/s400/xmem.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5357982364214145602" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;(this is from the RSS field generated by the command "ps v --no-heading -C kwin"* command)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Each instance where the trace maxes out then drops down again is a time when I started getting the problem and restarted kwin.  The flat spots are nights and weekends when I'm not using the computer.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Now, what to do about it?  I guess I should report a bug. This is Kubuntu 8.04, so it's a little out of date, but it's an LTS release.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;*I am amused by having mixed all three styles of command-line arguments in that ps command.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8405913371308041445-8153254826672406689?l=29realitystreet.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://29realitystreet.blogspot.com/feeds/8153254826672406689/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://29realitystreet.blogspot.com/2009/07/kwin-memory-leak-confirmed.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8405913371308041445/posts/default/8153254826672406689'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8405913371308041445/posts/default/8153254826672406689'/><link rel='alternate' type='text/html' href='http://29realitystreet.blogspot.com/2009/07/kwin-memory-leak-confirmed.html' title='kwin memory leak confirmed?'/><author><name>Charlie</name><uri>http://www.blogger.com/profile/06043239881824887794</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://3.bp.blogspot.com/-3dSdvJBTmIg/TVwdNJZcJ7I/AAAAAAAAB8w/0c53wbae0ao/s220/crazed.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_KcbXplbfPcw/SltgkovKskI/AAAAAAAABN8/sWZjSRO2HnA/s72-c/xmem.png' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8405913371308041445.post-6070211956301703352</id><published>2009-06-23T11:18:00.004-04:00</published><updated>2009-06-23T11:23:28.584-04:00</updated><title type='text'>if you keep a blog and nobody reads it, does it still make a sound?</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_KcbXplbfPcw/SkDyznh25ZI/AAAAAAAABNU/WV1Klmi2toE/s1600-h/yourblog.jpg"&gt;&lt;img style="cursor: pointer; width: 400px; height: 400px;" src="http://3.bp.blogspot.com/_KcbXplbfPcw/SkDyznh25ZI/AAAAAAAABNU/WV1Klmi2toE/s400/yourblog.jpg" alt="" id="BLOGGER_PHOTO_ID_5350543325914391954" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I don't doubt it.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://despair.com/yourblog.html"&gt;http://despair.com/yourblog.html&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8405913371308041445-6070211956301703352?l=29realitystreet.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://29realitystreet.blogspot.com/feeds/6070211956301703352/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://29realitystreet.blogspot.com/2009/06/if-you-blog-and-nobody-reads-it-does-it.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8405913371308041445/posts/default/6070211956301703352'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8405913371308041445/posts/default/6070211956301703352'/><link rel='alternate' type='text/html' href='http://29realitystreet.blogspot.com/2009/06/if-you-blog-and-nobody-reads-it-does-it.html' title='if you keep a blog and nobody reads it, does it still make a sound?'/><author><name>Charlie</name><uri>http://www.blogger.com/profile/06043239881824887794</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://3.bp.blogspot.com/-3dSdvJBTmIg/TVwdNJZcJ7I/AAAAAAAAB8w/0c53wbae0ao/s220/crazed.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_KcbXplbfPcw/SkDyznh25ZI/AAAAAAAABNU/WV1Klmi2toE/s72-c/yourblog.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8405913371308041445.post-2717534258403456505</id><published>2009-06-17T11:04:00.002-04:00</published><updated>2009-06-17T11:07:15.429-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Red Sox'/><category scheme='http://www.blogger.com/atom/ns#' term='Fenway'/><category scheme='http://www.blogger.com/atom/ns#' term='baseball'/><title type='text'>Take Me Out to the Ball Game</title><content type='html'>&lt;p class="mobile-photo"&gt;&lt;a href="http://1.bp.blogspot.com/_KcbXplbfPcw/SjkGAwnKarI/AAAAAAAABNE/_fTd6NXdiDc/s1600-h/20090616204406-775159.jpg"&gt;&lt;img src="http://1.bp.blogspot.com/_KcbXplbfPcw/SjkGAwnKarI/AAAAAAAABNE/_fTd6NXdiDc/s320/20090616204406-775159.jpg" alt="" id="BLOGGER_PHOTO_ID_5348312642598103730" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;Nothing says summer in New England like a perfect night at Fenway Park!&lt;/p&gt;&lt;p&gt;The Red Sox beat the Florida Marlins 8-2.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8405913371308041445-2717534258403456505?l=29realitystreet.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://29realitystreet.blogspot.com/feeds/2717534258403456505/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://29realitystreet.blogspot.com/2009/06/take-me-out-to-ball-game.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8405913371308041445/posts/default/2717534258403456505'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8405913371308041445/posts/default/2717534258403456505'/><link rel='alternate' type='text/html' href='http://29realitystreet.blogspot.com/2009/06/take-me-out-to-ball-game.html' title='Take Me Out to the Ball Game'/><author><name>Charlie</name><uri>http://www.blogger.com/profile/06043239881824887794</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://3.bp.blogspot.com/-3dSdvJBTmIg/TVwdNJZcJ7I/AAAAAAAAB8w/0c53wbae0ao/s220/crazed.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_KcbXplbfPcw/SjkGAwnKarI/AAAAAAAABNE/_fTd6NXdiDc/s72-c/20090616204406-775159.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8405913371308041445.post-8945621447212672667</id><published>2009-06-15T09:36:00.002-04:00</published><updated>2009-06-15T09:38:26.832-04:00</updated><title type='text'>"Oklahoma city threatens to call FBI over 'renegade' Linux maker"</title><content type='html'>Anyone who has ever installed an Apache web server on a Linux machine will get a good laugh from this.  It was in 2006, but it's worth reposting.&lt;br /&gt;&lt;br /&gt;Thanks to http://twitter.com/philipdurbin/ for posting it on Twitter.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.theregister.co.uk/2006/03/24/tuttle_centos/"&gt;http://www.theregister.co.uk/2006/03/24/tuttle_centos/&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8405913371308041445-8945621447212672667?l=29realitystreet.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://29realitystreet.blogspot.com/feeds/8945621447212672667/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://29realitystreet.blogspot.com/2009/06/oklahoma-city-threatens-to-call-fbi.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8405913371308041445/posts/default/8945621447212672667'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8405913371308041445/posts/default/8945621447212672667'/><link rel='alternate' type='text/html' href='http://29realitystreet.blogspot.com/2009/06/oklahoma-city-threatens-to-call-fbi.html' title='&quot;Oklahoma city threatens to call FBI over &apos;renegade&apos; Linux maker&quot;'/><author><name>Charlie</name><uri>http://www.blogger.com/profile/06043239881824887794</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://3.bp.blogspot.com/-3dSdvJBTmIg/TVwdNJZcJ7I/AAAAAAAAB8w/0c53wbae0ao/s220/crazed.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8405913371308041445.post-5794549948795056406</id><published>2009-06-09T15:46:00.006-04:00</published><updated>2009-06-09T16:09:30.575-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='licorice'/><title type='text'>licorice</title><content type='html'>Changing the subject entirely, let me just state for the record how much I love licorice. Not Twizzlers, but real licorice, especially the Dutch variety.  At the moment I am particularly fond of the &lt;a href="http://klene.nl/onzedrop.php?lijn=geld"&gt;Geldlijn line from Klene&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;My current favorite is their "Grof Geld":&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_KcbXplbfPcw/Si68-NxJ4uI/AAAAAAAABMk/5hFrjIAS0yk/s1600-h/grofgeld.jpg"&gt;&lt;img style="cursor: pointer; width: 244px; height: 320px;" src="http://2.bp.blogspot.com/_KcbXplbfPcw/Si68-NxJ4uI/AAAAAAAABMk/5hFrjIAS0yk/s320/grofgeld.jpg" alt="" id="BLOGGER_PHOTO_ID_5345417584769098466" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;It's a little sweet, a little salty, medium-soft-chewy, and bursting with licorice flavor.  My friend who lives in the Netherlands brought me some, and I get it in the U.S. from &lt;a href="http://www.hollandsbest.com/licorice/klene_drop_kilobag.php"&gt;Holland's Best&lt;/a&gt;.  Klene also makes "Zakkenrollers":&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_KcbXplbfPcw/Si6-iSZlFRI/AAAAAAAABMs/bZYlA5-aUc0/s1600-h/zakkenrollers.jpg"&gt;&lt;img style="cursor: pointer; width: 121px; height: 182px;" src="http://3.bp.blogspot.com/_KcbXplbfPcw/Si6-iSZlFRI/AAAAAAAABMs/bZYlA5-aUc0/s320/zakkenrollers.jpg" alt="" id="BLOGGER_PHOTO_ID_5345419303999313170" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;but I've been unable to find them for sale in the U.S.&lt;br /&gt;&lt;br /&gt;Now that I'm thinking about it, I remember that I'm also quite fond of these:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_KcbXplbfPcw/Si7AF5LLSXI/AAAAAAAABM0/9Z1vAHL-T6I/s1600-h/106018_hindelooper.jpg"&gt;&lt;img style="cursor: pointer; width: 200px; height: 200px;" src="http://3.bp.blogspot.com/_KcbXplbfPcw/Si7AF5LLSXI/AAAAAAAABM0/9Z1vAHL-T6I/s320/106018_hindelooper.jpg" alt="" id="BLOGGER_PHOTO_ID_5345421015214934386" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I first discovered them at &lt;a href="http://www.cardullos.com/"&gt;Cardullo's&lt;/a&gt;, but I see they can also be ordered by the case from &lt;a href="http://www.hollandsbest.com/licorice/van_slooten_drop_oldtimers.php"&gt;Holland's Best&lt;/a&gt;.&lt;br /&gt;I've also been fond of the (German) &lt;a href="http://www.amazon.com/Haribo-Gummi-Licorice-Wheels-5-Pound/dp/B000EVOQNC/ref=rsl_mainw_dpl?ie=UTF8&amp;amp;m=ATVPDKIKX0DER"&gt;Haribo Wheels&lt;/a&gt; and &lt;a href="http://www.amazon.com/Gustafs-Traditional-Dutch-Licorice-7-Ounce/dp/B000ETXO8W/ref=sr_1_37?ie=UTF8&amp;amp;s=grocery&amp;amp;qid=1244578051&amp;amp;sr=1-37"&gt;Gustaf's Traditional Dutch Licorice Drops&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Friends have told me of the bulk licorice stalls at the open-air markets in the Netherlands. I would really love to visit some of those.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8405913371308041445-5794549948795056406?l=29realitystreet.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://29realitystreet.blogspot.com/feeds/5794549948795056406/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://29realitystreet.blogspot.com/2009/06/licorice.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8405913371308041445/posts/default/5794549948795056406'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8405913371308041445/posts/default/5794549948795056406'/><link rel='alternate' type='text/html' href='http://29realitystreet.blogspot.com/2009/06/licorice.html' title='licorice'/><author><name>Charlie</name><uri>http://www.blogger.com/profile/06043239881824887794</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://3.bp.blogspot.com/-3dSdvJBTmIg/TVwdNJZcJ7I/AAAAAAAAB8w/0c53wbae0ao/s220/crazed.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_KcbXplbfPcw/Si68-NxJ4uI/AAAAAAAABMk/5hFrjIAS0yk/s72-c/grofgeld.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8405913371308041445.post-2065414589621579057</id><published>2009-06-08T16:22:00.010-04:00</published><updated>2009-06-08T17:13:12.274-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='kde'/><category scheme='http://www.blogger.com/atom/ns#' term='kwin'/><title type='text'>kwin it is!</title><content type='html'>"Next time" for this problem arrived rather quickly.  kwin started spewing errors almost nonstop, like&lt;br /&gt;&lt;blockquote style="font-family: courier new;"&gt;kwin: &lt;unknown&gt;(0x40d6b527): RenderBadPicture (invalid Picture parameter)&lt;br /&gt;kwin: &lt;unknown&gt;(0xcd613f): BadMatch (invalid parameter attributes)&lt;br /&gt;kwin: &lt;unknown&gt;(0x40d6b526): RenderBadPicture (invalid Picture parameter)&lt;br /&gt;kwin: X_FreePixmap(0x40d6b527): BadPixmap (invalid Pixmap parameter)&lt;br /&gt;kwin: &lt;unknown&gt;(0xcd614d): BadMatch (invalid parameter attributes)&lt;br /&gt;kwin: &lt;unknown&gt;(0x40d6b526): RenderBadPicture (invalid Picture parameter)&lt;br /&gt;kwin: X_PutImage(0x40d6b532): BadMatch (invalid parameter attributes)&lt;br /&gt;kwin: X_FreeGC(0x40d6b520): BadGC (invalid GC parameter)&lt;br /&gt;kwin: &lt;unknown&gt;(0xcd639c): BadMatch (invalid parameter attributes)&lt;br /&gt;kwin: &lt;unknown&gt;(0x40d6b520): RenderBadPicture (invalid Picture parameter)&lt;br /&gt;kwin: &lt;unknown&gt;(0xcd6414): BadMatch (invalid parameter attributes)&lt;br /&gt;kwin: &lt;unknown&gt;(0x40d6b52e): RenderBadPicture (invalid Picture parameter)&lt;br /&gt;kwin: &lt;unknown&gt;(0x40d6b520): BadDrawable (invalid Pixmap or Window parameter)&lt;br /&gt;kwin: &lt;unknown&gt;(0xcd641e): RenderBadPicture (invalid Picture parameter)&lt;br /&gt;kwin: &lt;unknown&gt;(0xcd641e): RenderBadPicture (invalid Picture parameter)&lt;br /&gt;kwin: X_FreePixmap(0x40d6b520): BadPixmap (invalid Pixmap parameter)&lt;br /&gt;kwin: X_FreeGC(0x40d6ad33): BadGC (invalid GC parameter)&lt;br /&gt;kwin: X_FreeGC(0x40d6ad38): BadGC (invalid GC parameter)&lt;/blockquote&gt;&lt;br /&gt;And then the garbage window decorations reappeared.  Killed and started kwin and the problem goes away!&lt;br /&gt;&lt;br /&gt;Info:&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;% kwin -v&lt;br /&gt;Qt: 3.3.8b&lt;br /&gt;KDE: 3.5.10&lt;br /&gt;KWin: 3.0&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;Kubuntu package: 4:3.5.10-0ubuntu1~hardy2&lt;br /&gt;&lt;br /&gt;The memory use monitoring was inconclusive because I started it only a couple of hours before this "reset". Continuing to gather statistics.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8405913371308041445-2065414589621579057?l=29realitystreet.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://29realitystreet.blogspot.com/feeds/2065414589621579057/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://29realitystreet.blogspot.com/2009/06/kwin-it-is.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8405913371308041445/posts/default/2065414589621579057'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8405913371308041445/posts/default/2065414589621579057'/><link rel='alternate' type='text/html' href='http://29realitystreet.blogspot.com/2009/06/kwin-it-is.html' title='kwin it is!'/><author><name>Charlie</name><uri>http://www.blogger.com/profile/06043239881824887794</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://3.bp.blogspot.com/-3dSdvJBTmIg/TVwdNJZcJ7I/AAAAAAAAB8w/0c53wbae0ao/s220/crazed.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8405913371308041445.post-16707479907843337</id><published>2009-06-08T13:53:00.007-04:00</published><updated>2009-06-08T14:06:35.942-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='kde'/><category scheme='http://www.blogger.com/atom/ns#' term='kwin'/><title type='text'>kwin the culprit?</title><content type='html'>I think I have localized the source of my display woes. Noting that the problem manifests in part as garbage in the window decorations, I thought of kwin, the window manager, which to the best of my knowledge is responsible for managing window decorations. Last time the problem occurred, I killed kwin and started a new one.  That did indeed clear the problem, so I just had to wait and see how long the fix would last.&lt;br /&gt;&lt;br /&gt;It's now been several days! That is longer than I've ever managed to recover before.  I think this might be it.  I'm monitoring the memory usage of kwin now to see if I can blame a memory leak.  It sure has that feel about it.&lt;br /&gt;&lt;br /&gt;As an aside, it was amusing to try to restart kwin after killing it.  Killing it took away the ability to switch the window focus, which was not in a terminal!  I ended up having to use the mouse to copy and paste individual characters k w i n &lt;newline&gt; into a shell.  Next time I'll set it up beforehand.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8405913371308041445-16707479907843337?l=29realitystreet.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://29realitystreet.blogspot.com/feeds/16707479907843337/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://29realitystreet.blogspot.com/2009/06/kwin-culprit.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8405913371308041445/posts/default/16707479907843337'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8405913371308041445/posts/default/16707479907843337'/><link rel='alternate' type='text/html' href='http://29realitystreet.blogspot.com/2009/06/kwin-culprit.html' title='kwin the culprit?'/><author><name>Charlie</name><uri>http://www.blogger.com/profile/06043239881824887794</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://3.bp.blogspot.com/-3dSdvJBTmIg/TVwdNJZcJ7I/AAAAAAAAB8w/0c53wbae0ao/s220/crazed.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8405913371308041445.post-963807318125865183</id><published>2009-06-04T12:17:00.000-04:00</published><updated>2009-06-04T13:06:33.939-04:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='x.org'/><category scheme='http://www.blogger.com/atom/ns#' term='fail'/><category scheme='http://www.blogger.com/atom/ns#' term='kde'/><category scheme='http://www.blogger.com/atom/ns#' term='kubuntu'/><title type='text'>Is my misery due to X.org, KDE, or Kubuntu?</title><content type='html'>I am a long-time Linux fan and have been a happy Kubuntu user (I prefer KDE's configurability to Gnome's) since Breezy Badger.  After upgrading to Kubuntu 8.04 (Hardy Heron), however, my system has exhibited an exasperating tendency to require a reboot about once per week.  After several days of use, the GUI becomes rather sluggish, and the window decorations start dissolving into garbage images for seconds at a time before being restored to their proper forms (i.e. full-screen, iconify, etc.).  Sometimes I can get it to stop by closing Firefox, kmail, pidgin, etc. and restarting them.  But it always ends in tears.  Eventually the GUI grinds to a halt and the X server crashes so badly that the machine requires a reboot.&lt;br /&gt;&lt;br /&gt;I have taken to logging out and logging back in (thus restarting X) at the first sign of this behavior, which is excruciating due to my use of 4 displays and 9 virtual desktops, typically covered with dozens of windows for the different projects I'm doing.  Even with KDE's Save/Restore Session feature, it's painful to set everything up again.&lt;br /&gt;&lt;br /&gt;I've been struggling to fix this since it started, but have had little success. Regular work seems to get in the way.  I will readily admit to some embarrassment about "living" like this.  I'm supposed to be a crack computer engineer!&lt;br /&gt;&lt;br /&gt;It's hard to remember all the things I've tried, but here are some:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;upgrading to Kubuntu 8.10 and 9.04 (fail, but that's another story)&lt;/li&gt;&lt;li&gt;tracking memory usage in the X server (I might have found a memory leak but the problem happens even when X memory usage doesn't grow)&lt;/li&gt;&lt;li&gt;fooling with xorg.conf options for my 3 different video cards&lt;/li&gt;&lt;/ul&gt;I learned a lot, but didn't solve it.&lt;br /&gt;&lt;br /&gt;Things I haven't tried but should:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;try Gnome, KDE in another dist, xfce, or my nostalgic favorite, fvwm&lt;/li&gt;&lt;li&gt;disable one video card at a time to try to localize the problem to a particular driver&lt;/li&gt;&lt;li&gt;enable debugging output for various components of the display system&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8405913371308041445-963807318125865183?l=29realitystreet.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://29realitystreet.blogspot.com/feeds/963807318125865183/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://29realitystreet.blogspot.com/2009/06/is-my-misery-due-to-xorg-kde-or-kubuntu.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8405913371308041445/posts/default/963807318125865183'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8405913371308041445/posts/default/963807318125865183'/><link rel='alternate' type='text/html' href='http://29realitystreet.blogspot.com/2009/06/is-my-misery-due-to-xorg-kde-or-kubuntu.html' title='Is my misery due to X.org, KDE, or Kubuntu?'/><author><name>Charlie</name><uri>http://www.blogger.com/profile/06043239881824887794</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://3.bp.blogspot.com/-3dSdvJBTmIg/TVwdNJZcJ7I/AAAAAAAAB8w/0c53wbae0ao/s220/crazed.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8405913371308041445.post-6951695035038810454</id><published>2009-06-04T11:51:00.000-04:00</published><updated>2009-06-04T12:39:53.624-04:00</updated><title type='text'>"Reality is nothing but a collective hunch"*</title><content type='html'>*&lt;a href="http://www.quotationspage.com/quotes/Jane_Wagner/"&gt;Jane Wagner&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Blogging, eh? I tried this once before but even &lt;span style="font-style: italic;"&gt;I&lt;/span&gt; got bored reading it!  I'm trying again though.  Welcome to my corner of reality, where I am (according to my &lt;a href="http://twitter.com/cakatz"&gt;Twitter profile&lt;/a&gt;) a &lt;span class="bio"&gt;geek, an engineer, a scientist, a dad, a husband, a gourmand, a music lover, a Red Sox fan, a lousy hockey player, &lt;a href="http://http//militantgeek.com/2009/02/16/put-twitter-updates-on-a-t-shirt/"&gt;a narcissistic lemming, and a vapid bleater&lt;/a&gt;&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;I hope you find something entertaining or even (gasp!) useful in here.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8405913371308041445-6951695035038810454?l=29realitystreet.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://29realitystreet.blogspot.com/feeds/6951695035038810454/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://29realitystreet.blogspot.com/2009/06/reality-is-nothing-but-collective-hunch.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8405913371308041445/posts/default/6951695035038810454'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8405913371308041445/posts/default/6951695035038810454'/><link rel='alternate' type='text/html' href='http://29realitystreet.blogspot.com/2009/06/reality-is-nothing-but-collective-hunch.html' title='&quot;Reality is nothing but a collective hunch&quot;*'/><author><name>Charlie</name><uri>http://www.blogger.com/profile/06043239881824887794</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://3.bp.blogspot.com/-3dSdvJBTmIg/TVwdNJZcJ7I/AAAAAAAAB8w/0c53wbae0ao/s220/crazed.jpg'/></author><thr:total>0</thr:total></entry></feed>
