<?xml version="1.0" encoding="utf-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>Irate Nate's weblog</title><link>http://www.method-combination.net/blog/</link><description>debugging life</description><language>en-us</language><generator>clog version 3b</generator><dc:creator>froydnj@gmail.com</dc:creator><dc:rights>Copyright 2004 Nathan Froyd</dc:rights><item><title>on minimalism</title><link>http://www.method-combination.net/blog/archives/2012/01/26/on-minimalism.html</link><pubDate>Thu, 26 Jan 2012 23:46:00 CDT</pubDate><description>&lt;P&gt;Every so often, I mention to my wife that &lt;A HREF=&quot;http://thebacklight.com/how-to-become-a-minimalist/&quot;&gt;we have too much
stuff&lt;/A&gt; and we need to get rid of it.  Every time, she agrees and
suggests that we start getting rid of stuff.  And every time she says we
should start with my books.&lt;/P&gt;&lt;P&gt;NOOOOO NOT MY BOOKS&lt;/P&gt;&lt;P&gt;We usually don't talk about it any more after that.&lt;/P&gt;&lt;P&gt;Actually, we do.  She then points out that we don't have a lot of
stuff, which I think is debatable.  We talk about that for a little
while and then drop the matter.&lt;/P&gt;&lt;P&gt;At least I have been learning to live with something more than
minimalism in other parts of my life.  Packing for trips, for instance.
I like to pack compactly: not insanely compactly, but I will take a
rolling suitcase that fits in the overhead bin for trips of a week or
more.&lt;/P&gt;&lt;P&gt;Packing this way does not work when you have multiple children and
go to anyplace more involved than Chick-fil-A.&lt;/P&gt;&lt;P&gt;I used to get really annoyed when we'd pack the car for trips to
see our parents.  &amp;ldquo;What?  Another bag?  What's that for?&amp;rdquo;
&amp;ldquo;Why do you have to take three dolls and a box of blocks?  You
have toys at [destination] to play with&amp;rdquo; Now I just breathe, make
little yoga motions with my hands, and carry the bag out to the car.  I
am at peace.&lt;/P&gt;&lt;P&gt;But I'm still really happy when we can get rid of stuff.&lt;/P&gt;</description><category>minimalism</category><category>peace</category><category>stuff</category></item><item><title>no sharing for you</title><link>http://www.method-combination.net/blog/archives/2012/01/24/no-sharing-for-you.html</link><pubDate>Tue, 24 Jan 2012 23:43:00 CDT</pubDate><description>&lt;P&gt;There was an item in my Facebook news feed saying that two of my
friends had shared an article via the Washington Post Social Reader.
OK, click on the article name to try to read it.&lt;/P&gt;&lt;P&gt;Hm, that takes me to a page where I'm supposed to sign up for the
Washington Post Social Reader.  That's odd.  Maybe I clicked the link
for the reader thingie.  Back to news feed.  Click.&lt;/P&gt;&lt;P&gt;Nope, still at the signup page.  Never mind, you've made linking to
your articles easy, but actually reading them tremendously hard.  No
thanks.  This is not how the web works, folks.&lt;/P&gt;&lt;P&gt;(Yo, I hear you like social networks, so I put a social network in
your social network so you can network while you network.  Or somesuch.)&lt;/P&gt;</description><category>internet</category><category>social</category><category>networks</category></item><item><title>taking struggles seriously</title><link>http://www.method-combination.net/blog/archives/2012/01/22/taking-struggles-seriously.html</link><pubDate>Sun, 22 Jan 2012 16:47:00 CDT</pubDate><description>&lt;P&gt;I love Francis Schaeffer's writings and outlook.  For instance,
this quote from &lt;A HREF=&quot;http://fromthestudy.com/2012/01/10/compassionate-engagement-part-3-life-at-labri-1/&quot;&gt;a series on Schaeffer's &amp;ldquo;compassionate engagement&amp;rdquo;&lt;/A&gt;:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;As Schaeffer spoke across the United States at various
colleges, he would not only impress listeners with his engagement with
the wider culture and his ability to make Christianity appear
intellectually tenable and relevant to the contemporary era, he also
demonstrated a notable compassion for those whose works he would analyze
and interpret.  This latter characteristic of Schaeffer's approach to
intellectual engagement was illustrated vividly when, after reading a
nonsensical poem by an unbelieving author, rebuked the laughing crowd,
saying,&lt;/P&gt;&lt;P&gt;I get so tired of Bible believing Christians who laugh at these
people&amp;mdash;who laugh at them when they look at their tortured paintings.  Do
you laugh at a man at the door of hell?  When evangelicals learn to stop
their laughing and take such men and their struggles seriously then
[evangelicals] can again begin to speak to our generation (Hankins,
77).&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;I offer this in juxtaposition, from &lt;A HREF=&quot;http://www.kschroeder.com/weblog/archive/2011/11/30/the-deepening-paradox&quot;&gt;Karl Schroeder's musings on the Fermi paradox&lt;/A&gt;:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;The mystery deepens almost by the day, because we've
now identified 700 extrasolar planets and the count is increasing
rapidly. We should shortly be racking up lists of Earthlike worlds, and
we're closing in on good estimates of how many there must be in our
galaxy. And the number is in the billions. So one central argument
against the existence of alien life--the 'rare Earth' argument that
environments to host it must be rare--has been more or less
disproven. And that, just this year.&lt;/P&gt;&lt;P&gt;As possible explanations dwindle, we are being drawn inexorably
toward the one explanation that is no explanation: that we really are
alone. Why should this be? As Wiley shows, all it would take would be
one alien species with our capabilities appearing, sometime in the past
couple of billion years, and for that species to surpass where we are
now technologically by, oh, say, a couple of hundred years... and the
evidence for their existence should be present right here in our own
solar system. It's an astonishing conclusion.&lt;/P&gt;&lt;P&gt;So are we alone? Well, there is one other possibility, at this
point. I've lately been trumpeting my revision of Clarke's Law (which
originally said 'any sufficiently advanced technology is
indistinguishable from magic'). My revision says that &lt;STRONG&gt;any
sufficiently advanced technology is indistinguishable from Nature&lt;/STRONG&gt;. (Astute readers will recognize this as a refinement and further
advancement of my argument in Permanence.) Basically, either advanced
alien civilizations don't exist, or we can't see them because they are
indistinguishable from natural systems. I vote for the latter.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;</description><category>seti</category><category>respect</category><category>francis schaeffer</category><category>apologetics</category></item><item><title>my summer vacation</title><link>http://www.method-combination.net/blog/archives/2011/09/18/my-summer-vacation.html</link><pubDate>Sun, 18 Sep 2011 21:44:00 CDT</pubDate><description>&lt;P&gt;I always disliked the inevitable &amp;ldquo;My Summer Vacation&amp;rdquo;
assignment in grade school.  Not that I had not enjoyed my summer, mind
you, but I was never the kid who went hunting for lions on the Serengeti
or the kid who defended a small Brazilian village from ant hordes with a
hoe and a glass of water.  My summer vacations always sounded rather
boring in comparison, even when compared against my classmates who had
done virtually the same things: a family vacation, maybe some swimming
or tennis lessons.  Maybe I do not have a flair for the dramatic in my
writing.&lt;/P&gt;&lt;P&gt;My big news this summer was starting a new job; I left my position
at CodeSourcery for a quite different position at Mozilla, working on
things related to Firefox performance.  I flew to California for a week
of orientation, raided the bike room for company shirts, came back on my
first red-eye ever, and headed to Gamefest 2011 to spend a great time
with old college friends.  (And we are getting old.)  The summer was off
to a good start.&lt;/P&gt;&lt;P&gt;A week later, one of the aforementioned company shirts had been
sliced open after I went into cardiac arrest, Tricia's mom called 911,
and Tricia and her dad performed chest compressions until the paramedics
came to intubate me and shock my heart.&lt;/P&gt;&lt;P&gt;Even now, it sounds surreal to write those words; I have no memory
of the actual cardiac arrest or the time spent in the ICU in a
medically-induced coma.  (A bit bummed that I have no &amp;ldquo;I saw the
light&amp;rdquo; stories.)  As near as the doctors could figure out, I
suffered from &lt;A HREF=&quot;http://www.ncbi.nlm.nih.gov/pubmedhealth/PMH0001204/&quot;&gt;streptococcal
myocarditis&lt;/A&gt;, an infection of the heart by the bacteria that causes
strep throat (which I had and was taking antibiotics for).  The doctors
said this sort of disease is not supposed to happen in the states; it's
common in the developing world, but antibiotics tend to prevent
complications like mine from ever showing up.  (We called the on call
cardiologist one night later on and he said he had never heard of such a
disease.)  I did not have a heart attack; there was no blockage in my
arteries, my heart merely stopped pumping properly and sat there
quivering instead.&lt;/P&gt;&lt;P&gt;As you can imagine, this turned life quite upside down; my
father-in-law recalls Tricia saying, &amp;ldquo;Stay with me, Nathan!&amp;rdquo;
as they both gave me CPR before the paramedics arrived.  Things were a
bit touch-and-go in the ICU; Tricia posted a lot of updates on Facebook
and got many, many well-wishes and prayers through doing so.  Neither of
us knows the full extent of the network of people we had praying for us;
I'm sure the circle was much bigger than both of us imagined.
Fortunately, I did come out of my medically-induced coma with no brain
damage, spent a few days in the hospital (a boring hospital room was
quickly enlivened with numerous drawings from my daughters), had a
pacemaker put in, and came home rather weak, but expecting a full
recovery.&lt;/P&gt;&lt;P&gt;And thanks be to God, recovered I have!  I went through seven weeks
or so of cardiac rehab at the hospital: walking/running/biking/weights
three times a week (with which, I must say, we've been grateful for the
extensive help from folks giving me rides and whatnot to help Tricia
out).  I'm happy to say that I showed steady progress through those
sessions and have come out of them feeling in about the shape I was
prior to hospitalization.  As far as we can tell, I've had virtually no
memory loss or other mental issues, which is great.  I went back to work
at the beginning of August (I needed a doctor's note to resume sitting
in a chair and staring at a computer screen all day, which I found
funny) and I've resumed running.  I generally feel like nothing
happened, except that I'm not supposed to drive until Christmas and I
have a small metal saucer embedded in my chest.&lt;/P&gt;&lt;P&gt;Well, almost nothing.  Me being my unemotional self, it was hard
for me to even think of anything really bad happening.  Sure, I went to
the hospital unconscious in an ambulance, was in a coma for a couple
days, but I could see myself improving in the hospital, could watch
myself getting stronger in rehab, and so forth.  Of course I was going
to come through!  Sure, we had to deal with a strep relapse about a
month after, and I seemed in rough shape then (they took my blood
pressure as something like 80 over 55 at the clinic), but I took drugs
and they worked that time!  What, me, worry?&lt;/P&gt;&lt;P&gt;Until about three weeks ago when Tricia's parents came to visit for
the weekend; they had thankfully been here the weekend of my cardiac
arrest and were extremely helpful in getting me to the hospital and
probably for keeping Tricia sane as well.  We went to Taste Cafe for
breakfast, as we had done that previous weekend, and as we were going
home (or maybe shortly after we arrived home), Tricia's dad said to me
totally in jest, &amp;ldquo;Don't take another three hour nap now!&amp;rdquo;
(Fatigue is one sign of heart problems.).&lt;/P&gt;&lt;P&gt;I freaked out.  I still can't really explain what was going on,
just this vague sense of dread that &lt;EM&gt;something&lt;/EM&gt; bad was going
to happen and I couldn't do anything about it.  That Bad Things
Happening was just going to be The Way Things Were when Mom and Dad
visited.  Or when we went to Taste for breakfast, or whatever.  Wisely,
Tricia told me go off and introvertly recharge for the afternoon, and
after that and talking to Mom and Dad about that weekend, I came out of
things feeling much better.  And then my Mom and Dad came the weekend
after that (they flew out the day I was hospitalized) and I was able to
talk with them too, which helped some more.&lt;/P&gt;&lt;P&gt;And then there was this past week, when I went to California for my
first Mozilla All-Hands.  Sure, flying across the country is routine,
but the circumstances surrounding the last flight certainly gave us
cause to worry.  (And I flew out on 9/11, which was just great from a
superstitious standpoint.)  I took strep-battling drugs with me just in
case, and was anxious the first day or two out there, but gradually
relaxed and treated things as Just Another Business Trip.  And I wound
up having a great time in California.&lt;/P&gt;&lt;P&gt;In any event, the stress/anxiety of the past couple of weeks have
certainly given me a new appreciation for what exactly went on three
months ago (tomorrow will be three months since I went to the hospital).
We also now know that I don't always get sick when parents come to
visit, I don't always go into cardiac arrest when I get strep, and
shortly we'll be reassured that I can fly to California and not get sick
the week after.  All in all, we're doing pretty well; God has blessed us
in our crisis.&lt;/P&gt;&lt;P&gt;Thanks for all of the well-wishes and prayers posted on Facebook
and otherwise; thanks for all of the meals, lawn mowings, and offers of
random help over the past couple months.  We've both been astonished,
grateful, and humbled at the outpouring of love and support we've been
shown during this time.&lt;/P&gt;</description><category>life</category><category>personal</category><category>medical</category></item><item><title>speeding up emacs saves</title><link>http://www.method-combination.net/blog/archives/2011/03/11/speeding-up-emacs-saves.html</link><pubDate>Fri, 11 Mar 2011 21:12:00 CDT</pubDate><description>&lt;P&gt;For a while now, I've noticed that saving files (maybe loading
files, but saving files especially) was ridiculously slow in emacs.  The
busy cursor would come up for a good second or two when saving files.
For a while I attributed it to the hard drive noticeably spinning up on
my laptop (which it's doing now as I write this), but then I noticed--or
got really annoyed--by the same behavior on my desktop.  Particularly
when editing files in a GCC git checkout, though I think it happened to
other files as well.&lt;/P&gt;&lt;P&gt;Investigating, I could tell via &lt;TT&gt;strace&lt;/TT&gt; that emacs was
spinning off several processes (!) every time I saved a file.  I tried
using &lt;TT&gt;edebug&lt;/TT&gt;, but that didn't seem to be working.  (Somebody
suggested that the routines I was trying to trace might be called
directly from the C code in emacs and not go through whatever hooks
edebug inserts into the system.  This explanation sounds plausible,
though quite unusual for emacs.)  Finally some kind soul--cmm, I
think--on &lt;TT&gt;#sbcl&lt;/TT&gt;, where I ranted about this, suggested
inserting:&lt;/P&gt;&lt;PRE&gt;(setq vc-handled-backends nil)&lt;/PRE&gt;&lt;P&gt;into my &lt;TT&gt;.emacs&lt;/TT&gt;.  Wow.  It was like getting a computer
upgrade, perhaps as radical of a change as an SSD might be; saves were
now &lt;EM&gt;lightning&lt;/EM&gt; fast compared to their prior speed.&lt;/P&gt;&lt;P&gt;I haven't poked into emacs's source code to see what was going on.
And the puzzling thing is that this doesn't seem to be a consistent
problem; James Knight/foom told me that he was dealing with large-ish
git repos, as I was, and VC wasn't causing him any heartache.  And
clearly other emacs users aren't having similar problems--or perhaps
everybody's silenty disabling VC and using more performant solutions.  I
did find &lt;A HREF=&quot;http://shallowsky.com/blog/linux/editors/no-emacs-version-control.html&quot;&gt;a similar story to my own&lt;/A&gt;, but only with searching for &lt;TT&gt;vc-handled-backends&lt;/TT&gt; explicitly, rather than other search terms
(&amp;ldquo;slow,&amp;rdquo; &amp;ldquo;saving,&amp;rdquo; etc.).&lt;/P&gt;&lt;P&gt;So, hopefully search engines pick this post up and other afflicted
people will find this solution and rejoice.  Even better, somebody more
knowledgeable about emacs than I will tell me what was really going
on...&lt;/P&gt;</description><category>emacs</category><category>programming</category><category>lisp</category></item><item><title>final fantasy youtube videos</title><link>http://www.method-combination.net/blog/archives/2011/02/16/final-fantasy-youtube-videos.html</link><pubDate>Wed, 16 Feb 2011 23:06:00 CDT</pubDate><description>&lt;P&gt;A while ago, once of my colleagues recommended Hayseed Dixie as an
enjoyable bluegrass cover band.  I went looking for them on YouTube and
found &lt;A HREF=&quot;http://www.youtube.com/watch?v=7mU2lJKkQ04&quot;&gt;a cover
of AC/DC's &amp;ldquo;Highway to Hell&amp;rdquo;&lt;/A&gt;:&lt;/P&gt;&lt;iframe title=&quot;YouTube video player&quot; width=&quot;480&quot; height=&quot;390&quot;
src=&quot;http://www.youtube.com/embed/7mU2lJKkQ04&quot; frameborder=&quot;0&quot;
allowfullscreen&gt;&lt;/iframe&gt;&lt;P&gt;Why yes, that's a bluegrass cover of a rock'n'roll classic dubbed
over a Final Fantasy video.  Excellent.&lt;/P&gt;&lt;P&gt;Seeing this reminded me of &lt;A HREF=&quot;http://www.youtube.com/watch?v=ty3DNme0EvA&quot;&gt;my all-time favorite
Final Fantasy video&lt;/A&gt;, set to The Offspring's &amp;ldquo;Staring at the
Sun&amp;rdquo;:&lt;/P&gt;&lt;iframe title=&quot;YouTube video player&quot; width=&quot;480&quot; height=&quot;390&quot;
src=&quot;http://www.youtube.com/embed/ty3DNme0EvA&quot; frameborder=&quot;0&quot;
allowfullscreen&gt;&lt;/iframe&gt;&lt;P&gt;And finally, because I clicked around after finding the Hayseed
Dixie cover, I discovered &lt;A HREF=&quot;http://www.youtube.com/watch?v=MX4lyjFbs2c&quot;&gt;this well-done video&lt;/A&gt;
set to DHT's &amp;ldquo;Listen to Your Heart.&amp;rdquo; I'm not a huge fan of
FFVIII (am a fan of the song, though), but the ballroom sequence at 1:12
is particularly sparkling.&lt;/P&gt;&lt;iframe title=&quot;YouTube video player&quot; width=&quot;480&quot; height=&quot;390&quot;
src=&quot;http://www.youtube.com/embed/MX4lyjFbs2c&quot; frameborder=&quot;0&quot;
allowfullscreen&gt;&lt;/iframe&gt;</description><category>videos</category><category>final fantasy</category><category>youtube</category></item><item><title>introducing nibbles</title><link>http://www.method-combination.net/blog/archives/2011/02/11/introducing-nibbles.html</link><pubDate>Fri, 11 Feb 2011 22:48:00 CDT</pubDate><description>&lt;P&gt;Steven Haflich, in an old Usenet posting, said:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;The most pernicious failing of the ANA in my opinion
is the refusal to admit the reality that computers deal in numeric bytes
and characters with specific formats and codings. A portable ANSI CL
program cannot write binary information to a socket or disk file that
would be portably readable by another language platform, even a
different Common Lisp, and even on the same system. A portable CL
program cannot write characters and/or binary numbers of varying format
to a single socket or stream. C and Java have no such problems, and
portable programs can interact (modulo a little care about endianness
byte order)...&lt;/P&gt;&lt;P&gt;If the language were redesigned today, I would like to see the
definition get a lot closer to the realities of underlying platforms --
recognize that 8-bit-bytes have an important reality unshared by 9-bit
bytes, recognize that real streams have endianess and need to have
arbitrary varying datatypes passed through them,...&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;I have been writing a small library, &lt;A HREF=&quot;http://method-combination.net/lisp/nibbles/&quot;&gt;nibbles&lt;/A&gt;, to address
some of the shortcomings of Common Lisp in the above area.
Specifically, nibbles features accessors on octet vectors for 16-, 32-,
and 64-bit signed and unsigned integers in both endiannesses, and
readers and writers from octet streams for the same.  On x86oid SBCL, it
also features efficient, optimized inlined versions of the vector
accessors for simple vectors.&lt;/P&gt;&lt;P&gt;Code for reading and writing floats in various endiannesses is also
present in the library, but has not been tested and is not exported in
this release.  Such support is planned for a future release.&lt;/P&gt;&lt;P&gt;Please check out the library, send feedback, and &lt;A HREF=&quot;https://github.com/froydnj/nibbles&quot;&gt;send patches&lt;/A&gt; if there are
features you'd like to see added or bugs that need to be fixed.  (It'd
be great to have optimized inlined vector accessors for CCL, for
instance...)&lt;/P&gt;</description><category>lisp</category><category>programming</category></item><item><title>reading into gene wolfe</title><link>http://www.method-combination.net/blog/archives/2011/01/28/reading-into-gene-wolfe.html</link><pubDate>Fri, 28 Jan 2011 19:34:00 CDT</pubDate><description>&lt;P&gt;&lt;A HREF=&quot;http://www.ultan.org.uk/&quot;&gt;Ultan's Library&lt;/A&gt; is a
resource filled with articles about Gene Wolfe's books.  Reading them is
fascinating stuff; all sorts of possibilities are opened up by people
who have clearly thought harder about this stuff than I have.  Consider
this passage, from the essay &lt;A HREF=&quot;http://www.ultan.org.uk/the-reader-as-augur/&quot;&gt;The Reader as Augur:
Beginnings and Endings in Gene Wolfe's The Book of the Long Sun&lt;/A&gt;:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;Chapter two of &lt;CITE&gt;Nightside&lt;/CITE&gt; implies much:
Silk visits the marketplace to buy a sacrificial victim, a signal that
divination is imminently necessary; the fact that animals and
vegetables, their names corresponding to the human nomenclature of Viron
(men have animal, and women vegetable, names) are on sale suggests that
a struggle is on for the ransom of souls; Silk rejects the purchase of a
catachrest (which speaks distortedly, as its name implies) in favour of
that of a night chough, which speaks clearly, if brokenly: he (and we)
should heed whatever signs are honest in a world of deception
(pp. 33-42).&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Wow.  That's just a small taste of the symbolism the essay author
pulls out of the book.  However...I understand that the point of this
essay is to suggest how the reader can act as augur, drawing out the
subtle implications of things as Silk himself might do.  Fine.  But am I
really supposed to think about all that and understand all that while
I'm reading?  &amp;ldquo;A struggle is on for the ransom of souls.&amp;rdquo;
Really?  Did I miss the week of class (or even the whole class) where
learning to read in this way was presented and practiced?  Failing that,
do people have a recommended book or two that discusses learning to read
this way?&lt;/P&gt;</description><category>books</category><category>interpretation</category></item><item><title>books I didn't finish</title><link>http://www.method-combination.net/blog/archives/2011/01/27/books-i-didnt-finish.html</link><pubDate>Thu, 27 Jan 2011 08:05:00 CDT</pubDate><description>&lt;P&gt;Last year, I read that it was OK to not finish books.  I practiced
this idea, having resolved many times to buy no more books until I
finished reading through the last stack, yet I have watched my book
storage needs grow significantly over the years.  But I never really
absorbed it, insofar as giving myself permission to stop midway through
a book, or even to skim it and count it as reading.  Getting the
majority of my books from the library has made doing this easier: I'm
not personally invested in them, so it's OK if I don't finish them.&lt;/P&gt;&lt;P&gt;Like two recent books that I checked out from the library.  I
skimmed through &lt;CITE&gt;Generation Ecstasy: Into the World of Techno
and Rave Culture&lt;/CITE&gt; by Simon Reynolds.  Since I'm a fan of electronica
in various guises, I thought this book would be an interesting
historical read.  What it did teach me is that I know very little about
electronic music, probably because a) I am not British and b) I don't
take &amp;ldquo;recreational&amp;rdquo; drugs (part of his thesis is that
electronic music is inescapably bound up with drug use, as you might
have guessed from the title).&lt;/P&gt;&lt;P&gt;When the major acts with which you are familiar (The Prodigy,
Chemical Brothers, etc.) are not brought up until the last chapter of
the book and are described as electronica watered down for American
sensibilities, you know you're in the wrong place.  Orbital did receive
roughly a page and their iconic song (Halcyon + On + On) did get a
mention, so that was a familiar place to hang my hat.  Speaking of
Orbital, this is a great place to &lt;A HREF=&quot;http://www.youtube.com/watch?v=62A8QWwJWRA&quot;&gt;reference a fantastic performance of said song&lt;/A&gt; (skip to about 3:30
if you just want the punchline):&lt;/P&gt;&lt;iframe title=&quot;YouTube video player&quot; class=&quot;youtube-player&quot;
type=&quot;text/html&quot; width=&quot;640&quot; height=&quot;390&quot;
src=&quot;http://www.youtube.com/embed/62A8QWwJWRA&quot; frameborder=&quot;0&quot;
allowFullScreen&gt;&lt;/iframe&gt;&lt;P&gt;Quite a departure from the sublime ethereality of the original, but
electronica anthem goodness nonetheless.&lt;/P&gt;&lt;P&gt;On the plus side, I now understand why I don't care for Massive
Attack (radically different sub-genre of electronica).&lt;/P&gt;&lt;P&gt;I also buzzed through &lt;A HREF=&quot;http://www.endgamethebook.org/&quot;&gt;&lt;CITE&gt;Endgame, volume II:
Resistance&lt;/CITE&gt;&lt;/A&gt; by Derrick Jensen.  I was pretty sure I wouldn't read
the whole thing after flipping through it in the library, but I thought
there might still be a nugget or two in there.  Wow.  I now understand
what the capital-L Left looks like.&lt;/P&gt;</description><category>books</category></item><item><title>swapping pieces</title><link>http://www.method-combination.net/blog/archives/2011/01/23/swapping-pieces.html</link><pubDate>Sun, 23 Jan 2011 21:19:00 CDT</pubDate><description>&lt;P&gt;We had an unusually early dinner tonight, so I was able to play a
game of chess with each of the girls tonight.  Becca played a decent
game; I tried to help her to avoid silly moves and to explain to her
what moves were particularly good.  She's at least thinking about things
like attacking the center and so forth.&lt;/P&gt;&lt;P&gt;Ally's game was a little more interesting.  She opened up with
1. h4 (&amp;ldquo;I'm attacking the center!&amp;rdquo; &amp;ldquo;Well, no, not
really...&amp;rdquo;) and the game proceeded from there.  We played for a
while and I eventually maneuvered her into checkmate.&lt;/P&gt;&lt;P&gt;&amp;ldquo;I don't want the game to be done!&amp;rdquo; she said.&lt;/P&gt;&lt;P&gt;Mentally preparing for a discussion of being a good sport, I asked,
&amp;ldquo;Why not?&amp;rdquo;&lt;/P&gt;&lt;P&gt;&amp;ldquo;Because I only have two pieces,&amp;rdquo; she replied,
indicating my pieces next to her.&lt;/P&gt;&lt;P&gt;&amp;ldquo;You want to capture more pieces, and then the game can be
over?&amp;rdquo; I asked.  She nodded and I permitted her king to engage in
a feat unknown to his kinsmen throughout the ages.  The next bit of the
game was then spent in me coming up with creative ways for her to take
my pieces, usually by prompting her when opportunities arose, while
trying to be careful to not totally give away the game.&lt;/P&gt;&lt;P&gt;After she had captured most of my &amp;ldquo;real&amp;rdquo; pieces, and I
had sniped away her pawns, she indicated that it would be OK for me to
capture pieces, too.  So I went to work with my queen, along with
prompting about what pieces to capture when.  We wound up with my king
and queen versus her king and you can probably guess the rest.  She
seemed happy enough about the whole thing, and we did have a chance to
demonstrate good sportsmanship too.&lt;/P&gt;</description><category>family</category><category>humor</category><category>chess</category></item><item><title>resolutions</title><link>http://www.method-combination.net/blog/archives/2010/12/24/resolutions.html</link><pubDate>Fri, 24 Dec 2010 20:51:00 CDT</pubDate><description>&lt;P&gt;I did only moderately well with resolutions this year.  I read a
lot of books, but not necessarily the ones I planned to read (sorry, &lt;CITE&gt;Anathem&lt;/CITE&gt;, &lt;CITE&gt;The Reformation&lt;/CITE&gt;, &lt;CITE&gt;Personal
Knowledge&lt;/CITE&gt;, &lt;CITE&gt;American Catholic&lt;/CITE&gt;, and others; I'll catch
you next year).  I read quite a bit in my Bible, but not all the way
through as I planned.  For whatever reason, I get bogged down when I hit
the wisdom books, particularly Psalms and Proverbs.  I think I did an OK
job of spending more time with my children this year, but probably not
as much I thought I would at the beginning of the year.  And so forth.&lt;/P&gt;&lt;P&gt;But there is one resolution I'm rather happy to have kept, only I
didn't make it at the start of the year.  Inspired partly by Clay
Shirky's ideas of cognitive surplus and how we might do great things if
we turned just a fraction of the time we spent watching TV into doing
other things, I set a goal in mid-May of getting one patch per day for
the rest of the year into GCC.  I could have chosen other projects (my
Common Lisp projects would have benefitted greatly from one patch per
day for seven months), but for reasons that I'll not cover here (ask me
offline if you really want to know), I decided to tidy up GCC a bit.&lt;/P&gt;&lt;P&gt;I'm happy to report at the end of the year that I've met my goal; &lt;TT&gt;git log --author=froydnj --since='11 May 2010' --format=oneline |
wc -l&lt;/TT&gt; says that I've made 220 commits.  (That actually falls just
slightly short of one patch per day, but I'm going to give myself some
slack.)  Granted, some of those were work related, but I'm going to
ignore that and call it good.  Some of them were bugfixes for problems I
caused, but I was still doing useful stuff by fixing the bugs, right?
And hey, that's an average, rather than one actual patch per day
(especially with a new baby and with stage 3 being in effect, I haven't
been doing much lately), but close enough.&lt;/P&gt;&lt;P&gt;Enough with the excuses; what did my patches do?  I &lt;A HREF=&quot;http://gcc.gnu.org/ml/gcc-patches/2010-07/msg01864.html&quot;&gt;eliminated
old interfaces&lt;/A&gt; (sadly, ditching &lt;TT&gt;__builtin_saveregs&lt;/TT&gt; was
not a easily done followup patch).  I &lt;A HREF=&quot;http://gcc.gnu.org/ml/gcc-patches/2010-07/msg01259.html&quot;&gt;deleted dead
code&lt;/A&gt;.  I &lt;A HREF=&quot;http://gcc.gnu.org/ml/gcc-patches/2010-07/msg01214.html&quot;&gt;renamed
things&lt;/A&gt;.  I &lt;A HREF=&quot;http://gcc.gnu.org/ml/gcc-patches/2010-07/msg00166.html&quot;&gt;eliminated
(minor) quadratic behavior&lt;/A&gt; (and &lt;A HREF=&quot;http://gcc.gnu.org/ml/gcc-patches/2010-07/msg00164.html&quot;&gt;again&lt;/A&gt;
and &lt;A HREF=&quot;http://gcc.gnu.org/ml/gcc-patches/2010-07/msg01090.html&quot;&gt;again&lt;/A&gt;).
I &lt;A HREF=&quot;http://gcc.gnu.org/ml/gcc-patches/2010-07/msg00002.html&quot;&gt;saved some space&lt;/A&gt; (several
patches did this, but I think this one is the most significant).  I &lt;A HREF=&quot;http://gcc.gnu.org/ml/gcc-patches/2010-10/msg01208.html&quot;&gt;starting untangling things that shouldn't be intertwined&lt;/A&gt;.  I &lt;A HREF=&quot;http://gcc.gnu.org/ml/gcc-patches/2010-10/msg00847.html&quot;&gt;macro-ized common idioms&lt;/A&gt;.  And so forth.&lt;/P&gt;&lt;P&gt;I learned a lot in doing all this.  As I looked through the code, I
also started to understand what bits needed to be cleaned up, and maybe
even a little bit of why.  And I have to say that I'm looking forward to
when 4.6 is released and patches start being accepted for 4.7; I'm
hoping that I'll find just as many opportunities to contribute next year
as well.&lt;/P&gt;</description><category>personal</category><category>programming</category><category>gcc</category></item><item><title>quotes from moral panics and the copyright wars</title><link>http://www.method-combination.net/blog/archives/2010/12/18/quotes-from-moral-panics-and-the-copyright-wars.html</link><pubDate>Sat, 18 Dec 2010 17:33:00 CDT</pubDate><description>&lt;P&gt;I recently finished &lt;CITE&gt;Moral Panics and the Copyright Wars&lt;/CITE&gt; by William Patry and found it to be quite good.  If you've read &lt;CITE&gt;Free Culture&lt;/CITE&gt; by Lawrence Lessig, the books are quite
similar; Patry's book is slightly more technical than Lessig's, but has
less of the obvious heart that &lt;CITE&gt;Free Culture&lt;/CITE&gt; exudes.  Patry
devotes a significant chunk of his book to unpacking the rhetoric of the
copyright wars (just because &lt;A HREF=&quot;http://www.method-combination.net/blog/archives/2010/09/28/on-piracy.html&quot;&gt;piracy has been used to
describe copyright breakers for two hundred years&lt;/A&gt; doesn't mean that
we are not emotionally affected by the description, for instance, or
that why describing the things involved as intellectual &lt;EM&gt;property&lt;/EM&gt; elicits particular judgements about the parties involved);
his analysis of the metaphors involved in describing the origins of
copyright--and why those metaphors don't work very well--is particularly
good.  I found several of the quotes in the book to be right on the
money, and I provide them for your enjoyment below.&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;Copyright and trademark are not matters of strong
moral principle.  Intellectual property regimes are economic legislation
based on policy decisions that assign rights based on assessments of
what legal rules will produce the greatest economic good for society as
a whole.&lt;/P&gt;&lt;P CLASS=&quot;quote-cite&quot;&gt;&lt;CITE&gt;&lt;A HREF=&quot;http://openjurist.org/489/f3d/474/sarl-louis-feraud-international-sa-v-viewfinder-inc-05-5927-cv&quot;&gt;Sarl Louis Feraud Intl' vs. Viewfinder, Inc., 2nd Circuit 2007&lt;/A&gt;&lt;/CITE&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;The principle of copyright is this.  It is a tax on
readers for the purpose of giving a bounty to writers.  The tax is an
exceedingly bad one; it is a tax on one of the most innocent and most
salutary of human pleasures; and never let us forget, that a tax on
innocent pleasures is a premium on vicious pleasures.  I admit, however,
the necessity of giving a bounty to genius and learning.  In order to
give such a bounty, I willingly submit even to this sever and burdensome
tax.  Nay, I am ready to increase the tax, if it can be shown that by so
doing I should proportionally increase the bounty.  My complaint is,
that my honourable and learned friend doubles, triples, quadruples, the
tax, and makes scarcely and perceptible addition to the bounty.&lt;/P&gt;&lt;P&gt;...It is good that authors should be remunerated; and the
least exceptionable way of remunerating them is by a monopoly.  Yet
monopoly is an evil.  For the sake of the good we must submit to the
evil; but the evil ought not to last a day longer than is necessary for
the purpose of securing the good.&lt;/P&gt;&lt;P CLASS=&quot;quote-cite&quot;&gt;--Lord Thomas Macaulay&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;We should be trying to hone the system so that the
greatest rewards and encouragement go to those industries which need and
deserve them the most.  Where IP rights perform their function of
advancing the science or arts, they should be encouraged to do so.
Where or to the extent that they do not, they have no justification and
the normal disciple of competition should apply.  The gluttony which has
resulted in the growth of of completely unnecessary or excessively long
IP rights undermines the system itself.&lt;/P&gt;&lt;P CLASS=&quot;quote-cite&quot;&gt;--Sir Hugh Laddie&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;It may seem unfair that much of the fruit of the
compiler's labor may be used by others without compensation.  As Justice
Brennan has correctly observed, however, this is not &amp;ldquo;some
unforseen byproduct of a statutory scheme.&amp;rdquo;...It is, rather,
&amp;ldquo;the essence of copyright,&amp;rdquo;...and a constitutional
requirement.  The primary goal of copyright is not to reward authors,
but &amp;ldquo;to promote the Progress of Science and useful Arts.&amp;rdquo;&lt;/P&gt;&lt;P CLASS=&quot;quote-cite&quot;&gt;--Justice Sandra Day O'Connor, &lt;CITE&gt;&lt;A HREF=&quot;http://en.wikipedia.org/wiki/Feist_v._Rural&quot;&gt;Feist Publications,
Inc. v. Rural Telephone Service Company&lt;/A&gt;&lt;/CITE&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;Not surprisingly, then, the metaphor of authors as
parents of their works was not first put forth by authors, but instead
by London book publishers in the eighteenth century, at the dawn of
modern copyright, to justify &lt;EM&gt;their&lt;/EM&gt; assertion of perpetual
commodity rights in authors' works.  As commodities, those works were
acquired by book publishers from authors for as little money as possible
(and sometimes no money).  The invocation of the metaphor was thus the
beard for publishers' economic objectives.  From the beginning of modern
copyright, we see one of the central rhetorical features of copyright
discourse--authors put forth as the basis for and beneficiaries of
rights that are in truth owned by publishers and other corporations who
regard authors as a negative item on balance sheets to be reduced as
much as possible.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;</description><category>copyright</category><category>politics</category><category>jurisprudence</category><category>books</category><category>quotes</category></item><item><title>optimizing pixel conversion</title><link>http://www.method-combination.net/blog/archives/2010/09/29/optimizing-pixel-conversion.html</link><pubDate>Wed, 29 Sep 2010 17:07:00 CDT</pubDate><description>&lt;P&gt;In &lt;A HREF=&quot;http://www.method-combination.net/blog/archives/2010/09/26/the-essence-of-pixel-conversion.html&quot;&gt;the previous post&lt;/A&gt; a previous post, I
described a framework for doing pixel conversion where the separate
steps were kept at arm's length: pixel reading, conversion proper, pixel
writing, and the loop over the pixels in question.  All of these steps
were tucked away behind generic functions and closures, making it
difficult for a static compiler to glom everything together and generate
high-performance code.  Runtime compilation might also have problems,
but at least there are more ways to attack the separation.&lt;/P&gt;&lt;P&gt;This post is about a way to open up optimization possibilities for
a static compiler and keep most of the abstraction.&lt;/P&gt;&lt;P&gt;The core idea behind the last proposal was that generic functions
could specify how to read, write, and convert pixels.  The core idea
here is that we need to extend the protocol to talk about how to loop
over the pixels: we need to provide a way to specialize operations at
the pixel buffer level.&lt;/P&gt;&lt;P&gt;With that in mind, our entry point looks like:&lt;/P&gt;&lt;PRE&gt;(defun convert-pixels (dst-format src-format dst-buffer dst-start
                       src-buffer src-start n-pixels)
  (funcall (find-bulk-converter dst-format src-format)
           dst-buffer dst-start src-buffer src-start n-pixels))&lt;/PRE&gt;&lt;P&gt;&lt;TT&gt;find-bulk-converter&lt;/TT&gt; can, by default, return the simple
converter we already discussed.&lt;/P&gt;&lt;PRE&gt;(defun simple-converter (reader converter writer n-pixels)
  (loop repeat n-pixels
        do (multiple-value-call writer
             (multiple-value-call converter (funcall reader)))))

(defmethod find-bulk-converter (dst-format src-format)
  (let ((converter (find-pixel-converter dst-format src-format)))
    #'(lambda (dst-buffer dst-start src-buffer src-start n-pixels)
        (let ((reader (pixel-reader src-format src-buffer src-start))
              (writer (pixel-writer dst-format dst-buffer dst-start)))
          (simple-converter reader converter writer n-pixels)))))&lt;/PRE&gt;&lt;P&gt;(I've renamed &lt;TT&gt;find-converter&lt;/TT&gt; from the first post into &lt;TT&gt;find-pixel-converter&lt;/TT&gt; to more accurately capture what the
function is supposed to do.)&lt;/P&gt;&lt;P&gt;Diversion: If you want to be obsessively micro-optimizing, you
might rewrite the &lt;TT&gt;pixel-reader&lt;/TT&gt; and &lt;TT&gt;pixel-writer&lt;/TT&gt; functions slightly:&lt;/P&gt;&lt;PRE&gt;(defmethod pixel-reader ((format rgba))
  #'(lambda (buffer start)
    #'(lambda ()
        (multiple-value-prog1 (values (aref buffer start)
                                      (aref buffer (+ start 1))
                                      (aref buffer (+ start 2))
                                      (aref buffer (+ start 3)))
          (incf start 4)))))

(defmethod pixel-writer ((format rgba))
  #'(lambda (buffer start)
    #'(lambda (r g b a)
        (setf (aref buffer start) r
              (aref buffer (+ start 1)) g
              (aref buffer (+ start 2)) b
              (aref buffer (+ start 3)) a)
        (incf start 4)
        (values))))&lt;/PRE&gt;&lt;P&gt;Why would you do this?  Well, because now you can move more
work&amp;mdash;specifically, generic function calls&amp;mdash;out of the
conversion function proper:&lt;/P&gt;&lt;PRE&gt;(defmethod find-bulk-converter (dst-format src-format)
  (let ((converter (find-pixel-converter dst-format src-format))
        (reader-gen (pixel-reader format))
        (writer-gen (pixel-writer format)))
    #'(lambda (dst-buffer dst-start src-buffer src-start n-pixels)
        (let ((reader (funcall reader-gen src-buffer src-start))
              (writer (funcall writer-gen dst-buffer dst-start)))
          (simple-converter reader converter writer n-pixels)))))&lt;/PRE&gt;&lt;P&gt;And because the double lambdas are pretty sweet.  Of course, nobody
reading this would do such things without profiling first, right?  Good.
Now, back to why we wanted to move to &lt;TT&gt;find-bulk-converter&lt;/TT&gt; in
the first place.&lt;/P&gt;&lt;P&gt;The advantage of this approach is that now you can write
specialized conversion routines that deal with entire buffers at once.
Need RGBA to CMYK conversion to go fast?&lt;/P&gt;&lt;PRE&gt;(defmethod find-bulk-converter ((dst-format cmyk) (src-format rgba))
  ;; Write whatever you like.  Maybe manually inlining the
  ;; read/convert/write routines is sufficient.  Maybe you can figure
  ;; out a clever way to share code between this routine and pixel
  ;; routines so the compiler does most of the heavy lifting for you.
  ;; Maybe write vectorized code if your implementation supports it.
  ;; Maybe call out to C if you really need to.
  ...)&lt;/PRE&gt;&lt;P&gt;Sure, you do have to duplicate all the stuff I mentioned
above--pixel reading, pixel writing, looping logic, etc.  But you only
have to do it for the cases that &lt;EM&gt;really&lt;/EM&gt; matter.  And if you
do something like vectorizing the code, chances are that the loop
structure and such would look quite different between routines anyway.
If it doesn't?  Good, try to abstract things away there, too.&lt;/P&gt;</description><category>lisp</category><category>programming</category><category>graphics</category></item><item><title>on piracy</title><link>http://www.method-combination.net/blog/archives/2010/09/28/on-piracy.html</link><pubDate>Tue, 28 Sep 2010 20:56:00 CDT</pubDate><description>&lt;P&gt;I've started reading &lt;CITE&gt;Piracy: The Intellectual Property
Wars from Gutenberg to Gates&lt;/CITE&gt; by Adrian Johns recently, and I've
found it to be engrossing reading.  Granted, I'm only 40 pages in, but
the story so far has been great.  The NEC &lt;A HREF=&quot;http://www.press.uchicago.edu/Misc/Chicago/4011189.html&quot;&gt;brandjacking
story at the beginning of the book&lt;/A&gt; boggles the mind.&lt;/P&gt;&lt;P&gt;I have also been suitably chastised with regards to the word
&amp;ldquo;piracy.&amp;rdquo;  Long ago, a more ignorant version of myself was
much impressed with &lt;A HREF=&quot;http://www.gnu.org/philosophy/words-to-avoid.html&quot;&gt;GNU's suggestion
to avoid various words&lt;/A&gt;, one of which is &amp;ldquo;piracy&amp;rdquo;; I will
quote their reasoning here:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;Publishers often refer to copying they don't approve
of as &amp;ldquo;piracy.&amp;rdquo; In this way, they imply that it is ethically
equivalent to attacking ships on the high seas, kidnapping and murdering
the people on them. Based on such propaganda, they have procured laws in
most of the world to forbid copying in most (or sometimes all)
circumstances. (They are still pressuring to make these prohibitions
more complete.)&lt;/P&gt;&lt;P&gt;If you don't believe that copying not approved by the publisher is
just like kidnapping and murder, you might prefer not to use the word
&amp;ldquo;piracy&amp;rdquo; to describe it. Neutral terms such as
&amp;ldquo;unauthorized copying&amp;rdquo; (or &amp;ldquo;prohibited copying&amp;rdquo;
for the situation where it is illegal) are available for use
instead. Some of us might even prefer to use a positive term such as
&amp;ldquo;sharing information with your neighbor.&amp;rdquo;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;I think it is fair to say that one might come away from reading
this with the expectation that this appropriation of
&amp;ldquo;piracy&amp;rdquo; is a recent doing.  A younger, idealistic version
of myself might be forgiven for wanting to fight back against the media
companies's propaganda campaign.  However, &lt;CITE&gt;Piracy&lt;/CITE&gt;
states:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;When and where exactly did people begin to refer to
intellectual purloining as piracy?  The answer is clearer than one might
suppose.  It is easy to establish that the usage emerged in English
before it did in other European languages.  It is more difficult to
establish the exact moment the term was coined, but it seems clear that
it occurred some time in the mid-seventeenth century.  In around 1600
piracy seems not to have carried this meaning at all, except on a few
isolated occasions as a metaphor...&lt;/P&gt;&lt;P&gt;At the other end of the century, however, piracy suddenly appears
everywhere.  It is prominent in the writing of Defoe, Swift, Addison,
Gay, Congreve, Ward, and Pope, and &lt;CITE&gt;pirate&lt;/CITE&gt; suddenly starts
to be defined in dictionaries as &amp;ldquo;one who unjustly prints another
person's copy.&amp;rdquo;  Very soon after that, it can be seen invoked in
learned or medical contentions...And dictionaries of other European
languages published in the late seventeenth and eighteenth centuries
then show the term spreading &amp;mdash; first to France, then to Italy, and
at length to Germany too...&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;So if Johns is to be believed, the usage of the word is not exactly
a new phenomenon&amp;mdash;we've been using it as a synonym for unauthorized
copying for several centuries now.  Definitely not a late twentieth
century invention; probably a little late to turn back the clock.  Also
worthwhile to note that the term appears to have been
introduced/popularized by the &lt;EM&gt;writers&lt;/EM&gt;, not the
publishers&amp;mdash;though the publishers probably had an opinion.&lt;/P&gt;&lt;P&gt;Johns goes on to write about the origins of &amp;ldquo;piracy&amp;rdquo;:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;Ancient writers bequeathed two principal associations
of the word &lt;CITE&gt;pirate&lt;/CITE&gt;.  Pirates were seagoing thieves,
certainly.  But there was more to them than that.  They were irritants
to the civilized order itself.  Their very existence amounted to a test
of that order.  Cicero, for example, invoked the pirate as his &lt;EM&gt;ur&lt;/EM&gt;-criminal &amp;mdash; he who declined even the honor that supposedly
obtained among thieves.  The thing about pirates, for Cicero, was that
they lay beyond all society.  They had no set place, and owed no
customary allegiance to legitimate authority.  Their existence required
that society distinguish itself and its conduct from all that they
did...Indeed, it was their sheer unsociability that for him seemed the
defining characteristic of pirates...&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;I think the people in &lt;A HREF=&quot;http://en.wikipedia.org/wiki/Pirate_Parties_International&quot;&gt;pirate
parties&lt;/A&gt; would not necessarily object to the second description
above.&lt;/P&gt;</description><category>books</category><category>culture</category></item><item><title>more pixel conversion</title><link>http://www.method-combination.net/blog/archives/2010/09/27/more-pixel-conversion.html</link><pubDate>Mon, 27 Sep 2010 21:01:00 CDT</pubDate><description>&lt;P&gt;A couple of thoughts on &lt;A HREF=&quot;http://www.method-combination.net/blog/archives/2010/09/26/the-essence-of-pixel-conversion.html&quot;&gt;the previous post&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;First, thanks to everyone who pointed out that I should have been
using &lt;A CLASS=&quot;hyperspec&quot; HREF=&quot;http://www.lispworks.com/documentation/HyperSpec/Body/s_mult_1.htm&quot;&gt;&lt;TT&gt;multiple-value-prog1&lt;/TT&gt;&lt;/A&gt; instead of &lt;A CLASS=&quot;hyperspec&quot; HREF=&quot;http://www.lispworks.com/documentation/HyperSpec/Body/m_prog1c.htm&quot;&gt;&lt;TT&gt;prog1&lt;/TT&gt;&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;Second, one person commented that they didn't really understand the
point of the post.  I should have explained the context behind the post.&lt;/P&gt;&lt;P&gt;If you look at graphics code--or at least the open-source graphics
code I've happened to look at in the past week or so, maybe there's
better stuff out there--there's a lot of repeated code.  Cut-and-paste
programming, sure, but also just a lack of abstraction in general.
Maybe that's a result of using C; maybe it's a result of a lack of
imagination.  Maybe using C causes a lack of imagination.  &lt;EM&gt;wink&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;I wanted to see if I could be more abstract.  If I have to write
pixel conversion routines from grayscale to RGBA and CMYK to RGBA, I
think it'd be a clever thing to only write the &amp;ldquo;stuff pixels in
RGBA format &lt;EM&gt;here&lt;/EM&gt;&amp;rdquo; once.  Likewise, if I have to write
CMYK to grayscale, I shouldn't have to rewrite the &amp;ldquo;grab pixels in
CMYK format&amp;rdquo; bits again.  Writing out the core conversion loops
gets tedious after a while.  We have first-class functions; we ought to
be able to separate out the looping logic from the &amp;ldquo;do this inside
the loop&amp;rdquo; logic.  And so on.&lt;/P&gt;&lt;P&gt;Part of the subtext also is that for me is that when I sit down to
write Lisp, I often get distracted by the One True Way to do it, the way
that will yield the fastest code out of the compiler the first time.  I
might not always succeed at doing it, but I get distracted by it.&lt;/P&gt;&lt;P&gt;For whatever reason, I don't have this problem when writing Python
or even C, only in Lisp.  I don't write prototyping code very well in
Lisp.  So whipping out thirty lines of code that looks reasonably useful
and that might not be screaming performance-wise is a good exercise for
me.&lt;/P&gt;&lt;P&gt;From all that came the sketch of the ideas yesterday: write the
&amp;ldquo;read a pixel in this format&amp;rdquo; once, write the &amp;ldquo;write a
pixel in this format&amp;rdquo; once, write the core conversion loop once,
etc.  As a bonus, a function like:&lt;/P&gt;&lt;PRE&gt;(defmethod pixel-reader ((format rgba) buffer start)
  #'(lambda ()
      (multiple-value-prog1 (values (aref buffer start)
                                    (aref buffer (+ start 1))
                                    (aref buffer (+ start 2))
                                    (aref buffer (+ start 3)))
        (incf start 4))))&lt;/PRE&gt;&lt;P&gt;would work regardless of the particular datatype of the RGBA
components, assuming the inheritance hierarchy is written sanely.  8-bit
bytes, 16-bit words, single-precision floats, all of these and more are
taken care of with one function.  Granted, you'd probably want to write
separate methods for each datatype if you were being serious about
taking this route.&lt;/P&gt;&lt;P&gt;I felt pretty good about my codesketch.  I prototyped, it looked
reasonable, and it didn't have to cons 0 bytes and run 20x faster than
the naive method.  I wanted to share.  That's the explanation that
should have gone in yesterday's post.&lt;/P&gt;</description><category>lisp</category><category>programming</category><category>graphics</category></item><item><title>the essence of pixel conversion</title><link>http://www.method-combination.net/blog/archives/2010/09/26/the-essence-of-pixel-conversion.html</link><pubDate>Sun, 26 Sep 2010 21:47:00 CDT</pubDate><description>&lt;P&gt;In the spirit of noodling around with code, I present pixel
conversion in Lisp:&lt;/P&gt;&lt;PRE&gt;(defmethod pixel-reader ((format rgba) buffer start)
  #'(lambda ()
      (multiple-value-prog1 (values (aref buffer start)
                                    (aref buffer (+ start 1))
                                    (aref buffer (+ start 2))
                                    (aref buffer (+ start 3)))
        (incf start 4))))

(defmethod pixel-writer ((format rgba) buffer start)
  #'(lambda (r g b a)
      (setf (aref buffer start) r
            (aref buffer (+ start 1)) g
            (aref buffer (+ start 2)) b
            (aref buffer (+ start 3)) a)
      (incf start 4)
      (values)))

(defmethod find-converter ((dst-format rgba-float) (src-format rgba-u8))
  #'(lambda (r g b a)
      (values (float r 1.0f0) (float g 1.0f0) (float b 1.0f0) (float a 1.0f0))))

(defun convert-pixels (dst-format src-format dst-buffer dst-start
                       src-buffer src-start n-pixels)
  (loop with converter = (find-converter dst-format src-format)
        with reader = (pixel-reader src-format src-buffer src-start)
        with writer = (pixel-writer dst-format dst-buffer dst-start)
        repeat n-pixels
        do (multiple-value-call writer
             (multiple-value-call converter (funcall reader)))))&lt;/PRE&gt;&lt;P&gt;I think that's pretty code, though probably not very efficient.
But tweaking it with something like:&lt;/P&gt;&lt;PRE&gt;(defmethod pixel-writer ((format rgba-float) buffer start)
  #'(lambda (rgba-vec)
      (replace buffer rgba-vec :start1 start)
      (incf start 4)
      (values)))

(defmethod find-converter ((dst-format rgba-float) (src-format rgba-u8))
  (let ((rgba-vec (make-array 4 :element-type 'single-float)))
    #'(lambda (r g b a)
        (setf (aref rgba-vec 0) (float r 1.0f0)
              (aref rgba-vec 1) (float g 1.0f0)
              (aref rgba-vec 2) (float b 1.0f0)
              (aref rgba-vec 3) (float a 1.0f0))
        rgba-vec)))&lt;/PRE&gt;&lt;P&gt;would eliminate a major source of consing (depending on the
implementation, of course; maybe &lt;A CLASS=&quot;hyperspec&quot; HREF=&quot;http://www.lispworks.com/documentation/HyperSpec/Body/t_short_.htm&quot;&gt;&lt;TT&gt;single-float&lt;/TT&gt;&lt;/A&gt;s aren't boxed in
your implementation).  The small minus is having to repeat the &lt;TT&gt;rgba-vec&lt;/TT&gt; trick for every conversion function, but maybe there's a
clever way around that.&lt;/P&gt;</description><category>lisp</category><category>programming</category><category>graphics</category></item><item><title>long-term change</title><link>http://www.method-combination.net/blog/archives/2010/09/04/long-term-change.html</link><pubDate>Sat, 04 Sep 2010 19:44:00 CDT</pubDate><description>&lt;P&gt;A number of months ago, I read an article about Toyota Prius
owners.  The Prius features a little gauge that indicates your current
gas mileage.  This article related how a pasttime among Prius owners is
to attempt to optimize that number: i.e. make it as high as possible for
the longest amount of time possible.  Driving then turns into a sort of
game, where your score is measured by a summation of this little gauge
over the course of your trip.&lt;/P&gt;&lt;P&gt;My car didn't have a similar gauge, but it does have &lt;A HREF=&quot;http://en.wikipedia.org/wiki/Tachometer&quot;&gt;a tachometer&lt;/A&gt;.  I figured
a low RPM reading was a pretty good proxy for high gas mileage, and so I
set out to play the same game while I drove.  Over the course of the
next several weeks, it was rare for me to rev the car over 2k RPM.  I'm
sure I ticked off some drivers with my comparitively slow start from
stoplights and such.  (More often than not, however, I'd meet them at
the next light, secretly gloating inside.)&lt;/P&gt;&lt;P&gt;I hardly pay attention to the tachometer nowadays.  My game-playing
while driving has been occupied by trying to minimize braking and
outright stopping, which is similar to the above game, but not quite the
same thing.  I did happen to look at the tachometer several times this
afternoon while out driving and it didn't read above 2k RPM.  Having not
kept good records, I can't say what my best effort is, but a trip
recently included a non-stop segment starting somewhere on 46th Street,
turning right on Emerson, and continuing until the light at 10th
Street.&lt;/P&gt;&lt;P&gt;I suppose this makes me &lt;A HREF=&quot;http://en.wikipedia.org/wiki/Hypermiling&quot;&gt;a hypermiler&lt;/A&gt;.  I have
so far restrained myself from modding the minivan.&lt;/P&gt;&lt;P&gt;What's interesting to me is how easily I've been able to effect
long-term change in this relatively trivial area of my life while being
unable to affect similar changes in more significant areas.  I don't
drive to work and we rarely go out in the evenings, so I probably drive
about 20-30 miles a week.  I honestly don't know whether I'm really
saving that much gas.  Or whether my behavior, in the aggregate, is
causing my fellow motorists to drive slightly more aggressively
(&amp;ldquo;that idiot in the minivan, why won't he drive any
faster?!&amp;rdquo;) and thereby canceling gas savings or even using more
gas overall.  Yet a small example about a game I'm not even able to play
&amp;ldquo;properly&amp;rdquo; has motivated me to make changes of questionable
effectiveness in my driving habits.&lt;/P&gt;&lt;P&gt;Whereas other examples--say, the claimed effectiveness of people
using &lt;A HREF=&quot;http://org-mode.org/&quot;&gt;org-mode for Emacs&lt;/A&gt;--have
not given me the same sort of motivation.  I have tried using org-mode
several times, and I succeed for a couple of days, maybe even a couple
of weeks, but I eventually fall off the wagon.  It ought to help me stop
things from falling through the cracks, lessen mental stress, make me
look &amp;ldquo;with it&amp;rdquo; to coworkers and such.  And it would help
reduce the &amp;ldquo;wow, I didn't mean to spend an hour twiddling around
following random links on the web&amp;rdquo; factor that sometimes occupies
my evenings.  Yet I remain stubbornly opposed to improving my life in
this manner.  What's the secret ingredient in the first case that's not
present in the second?&lt;/P&gt;</description><category>motivation</category><category>rewards</category><category>personal</category><category>gtd</category><category>driving</category></item><item><title>horns</title><link>http://www.method-combination.net/blog/archives/2010/08/18/horns.html</link><pubDate>Wed, 18 Aug 2010 22:38:00 CDT</pubDate><description>&lt;P&gt;So.  Horns.&lt;/P&gt;&lt;P&gt;&lt;object width=&quot;640&quot; height=&quot;385&quot;&gt;&lt;param name=&quot;movie&quot;
value=&quot;http://www.youtube.com/v/XVM4glts9FM?fs=1&amp;amp;hl=en_US&quot;&gt;&lt;/param&gt;&lt;param
name=&quot;allowFullScreen&quot; value=&quot;true&quot;&gt;&lt;/param&gt;&lt;param
name=&quot;allowscriptaccess&quot; value=&quot;always&quot;&gt;&lt;/param&gt;&lt;embed
src=&quot;http://www.youtube.com/v/XVM4glts9FM?fs=1&amp;amp;hl=en_US&quot;
type=&quot;application/x-shockwave-flash&quot; allowscriptaccess=&quot;always&quot;
allowfullscreen=&quot;true&quot; width=&quot;640&quot;
height=&quot;385&quot;&gt;&lt;/embed&gt;&lt;/object&gt;&lt;/P&gt;&lt;P&gt;Great video.&lt;/P&gt;&lt;P&gt;Anyway, I have a persistent inability to &lt;A HREF=&quot;http://en.wikipedia.org/wiki/Corna&quot;&gt;throw horns&lt;/A&gt;.  This affliction
is probably due to a video watched in church as a youngster describing
the evils of rock'n'roll.  You know, the video that talked about
pentagrams and the twisted lyrics that only emerge when playing Black
Sabbath songs backwards?  For whatever reason, the bit about the hand
gestures lodged itself deeply into my neurons.&lt;/P&gt;&lt;P&gt;Instead of throwing horns, I invariably make the &lt;A HREF=&quot;http://en.wikipedia.org/wiki/ILY_sign&quot;&gt;I love you&lt;/A&gt; sign.  (I never
noticed that it combined the three letters together; that's rather
slick.)  This quirk would also make me a terrible Texas Longhorns fan,
as I'd be making gestures of peace and love to the Texas Aggies sitting
across the stadium.&lt;/P&gt;</description><category>life</category><category>humor</category><category>music</category></item><item><title>long time no see</title><link>http://www.method-combination.net/blog/archives/2010/07/31/long-time-no-see.html</link><pubDate>Sat, 31 Jul 2010 23:11:00 CDT</pubDate><description>&lt;P&gt;So, I haven't blogged in a while.  I experienced my first ever hard
drive crash several weeks ago; that was a fun experience.  But that's
not why I haven't been blogging.  I've mostly been busy in the evenings
doing things with &lt;A HREF=&quot;http://gcc.gnu.org/&quot;&gt;GCC&lt;/A&gt;, like
writing &lt;A HREF=&quot;http://gcc.gnu.org/ml/gcc-patches/2010-07/msg01214.html&quot;&gt;huge,
machine-generated patches&lt;/A&gt;.  Anyway, here's some of the things I've
been reading in the time since my last blog post.&lt;/P&gt;&lt;P&gt;&lt;A HREF=&quot;http://askakorean.blogspot.com/&quot;&gt;Ask a Korean!&lt;/A&gt; Just
what it sounds like.  I hope the few Koreans in my life will be able to
appreciate the humor--definitely read around.  I came to the site
through &lt;A HREF=&quot;http://askakorean.blogspot.com/2010/01/koreans-english-acquisition-and-best.html&quot;&gt;Best way to learn a foreign language&lt;/A&gt;, but being a geek, I also
appreciated &lt;A HREF=&quot;http://askakorean.blogspot.com/2010/02/why-is-starcraft-popular-in-korea.html&quot;&gt;Why is Starcraft popular in Korea?&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&amp;ldquo;&lt;A HREF=&quot;http://www.antipope.org/charlie/blog-static/rants/nothing-like-this-will-be-buil.html&quot;&gt;Nothing like this will ever be built again&lt;/A&gt;&amp;rdquo;, Charlie Stross's
writeup of a tour through a nuclear reactor.  I did a report on nuclear
reactors in fourth grade.  I wrote the entire thing (with poster!) the
night before.  I got an A+.  Mr. Stross's explanation is way better than
my little report.&lt;/P&gt;&lt;P&gt;&lt;A HREF=&quot;http://www.crypto.com/blog/titans/&quot;&gt;Notes from the
No-Lone Zone&lt;/A&gt;, Matt Blaze's trip through a nuclear missile launch
facility.  To wit:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;It's worth asking whether displaying a terrible
artifact of 40 years on the edge of oblivion for all to see really makes
good sense. The author Barbara Kingsolver visited the site after it
first opened for public tours and concluded that it doesn't. &amp;ldquo;If a
missile museum,&amp;rdquo; she wrote in her essay &lt;CITE&gt;In the Belly of
the Beast&lt;/CITE&gt;, &amp;ldquo;can do no more than stop up our mouths with either
patriotic silence or desperation, it's a monument the living can't
afford. I say slam its doors for good. Tip a cement truck to the silo's
gullet and seal in the evil pharaoh...&amp;rdquo;&lt;/P&gt;&lt;P&gt;I disagree strongly, and not just because I was grateful for the
chance to see this horrible and beautiful place for myself and to meet
the people who served there. We owe it to them to listen to their
stories and to ourselves to learn from them. &lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;A HREF=&quot;http://catalogliving.tumblr.com/&quot;&gt;Catalog Living&lt;/A&gt;,
&amp;ldquo;A look into the exciting people who live in your catalogs.&amp;rdquo;
Writing up captions for Pottery Barn advertisements was never so
funny.  My favorites include &lt;A HREF=&quot;http://catalogliving.tumblr.com/post/853820589/light-up-the-sky&quot;&gt;Light up the sky&lt;/A&gt;, &lt;A HREF=&quot;http://catalogliving.tumblr.com/post/823734613/staying-warm&quot;&gt;Staying
warm&lt;/A&gt;, &lt;A HREF=&quot;http://catalogliving.tumblr.com/post/780311963/we-are-family&quot;&gt;We are
family&lt;/A&gt;, and &lt;A HREF=&quot;http://catalogliving.tumblr.com/post/766128532/reading-is-fundamental&quot;&gt;Reading is fundamental&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&lt;A HREF=&quot;http://groups.google.com/group/rec.arts.sf.written/msg/073bea1aa44c9396?dmode=source&amp;pli=1&quot;&gt;Vacuum pockets&lt;/A&gt;.  You really just have to read this one for
yourself.&lt;/P&gt;&lt;P&gt;&lt;A HREF=&quot;http://ask.metafilter.com/158740/You-were-doing-it-wrong&quot;&gt;You were doing it wrong&lt;/A&gt;: a humorous collection of things people
have learned throughout their lives.  I think my favorite is &lt;A HREF=&quot;http://ask.metafilter.com/158740/You-were-doing-it-wrong#2275588&quot;&gt;this one&lt;/A&gt;, about learning to ask for help and about &lt;CITE&gt;Atlas
Shrugged&lt;/CITE&gt;.&lt;/P&gt;&lt;P&gt;&lt;A HREF=&quot;http://www.resultsjunkies.com/blog/back-office-exposed-bingo-card-creator/?utm_source=feedburner&amp;utm_medium=feed&amp;utm_campaign=Feed:+ResultsJunkies+(Results+Junkies)&quot;&gt;This writeup&lt;/A&gt; succinctly explains why I will not be starting a small
business anytime soon.  I simply don't have the market sense to
recognize opportunities for things like bingo card generators.  Sounds
like a nice little niche.&lt;/P&gt;&lt;P&gt;&lt;A HREF=&quot;http://www.wired.com/wired/archive/4.12/ffglass_pr.html&quot;&gt;Mother Earth Mother Board&lt;/A&gt; is Neal Stephenson's travel log of
tracking the longest wire on earth (&amp;ldquo;the hacker tourist ventures
forth&amp;rdquo;).  I can totally see where Douglas Shaftoe came from.  It
is, as you might expect, somewhat long, but a worthwhile read--and I've
only read a third of it or so at this point.  Really wish somebody would
do a followup piece.&lt;/P&gt;</description><category>humor</category><category>links</category></item><item><title>re-reading robert jordan</title><link>http://www.method-combination.net/blog/archives/2010/05/08/re-reading-robert-jordan.html</link><pubDate>Sat, 08 May 2010 14:44:00 CDT</pubDate><description>&lt;P&gt;I was in an airport bookstore last week and picked up one of the
newer &lt;CITE&gt;Wheel of Time&lt;/CITE&gt; books.  I opened it to a random page
and read:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;Nynaeve crossed her arms under her breasts and
sniffed.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Yes, well, shocking.  I stopped reading after &lt;CITE&gt;Winter's
Heart&lt;/CITE&gt;, but I have found something that almost makes me want to start
reading them again.  It's Leigh Butler's &lt;A HREF=&quot;http://www.tor.com/index.php?option=com_content&amp;view=blog&amp;id=11741&quot;&gt;Wheel of Time Re-Read&lt;/A&gt;, wherein she, well, re-reads Jordan's epic,
complete with varying amounts of breezy, pop-culture commentary on each
bit.  My favorite bit so far, having only &amp;ldquo;re-read&amp;rdquo; &lt;CITE&gt;The Shadow Rising&lt;/CITE&gt;, was an musing on Mat as the classic American
hero.&lt;/P&gt;&lt;P&gt;She's in the middle of &lt;CITE&gt;The Path of Daggers&lt;/CITE&gt; right now.
I find myself strongly tempted to re-read all of the novels--and read
the new ones--through the lens of this blog.  I haven't looked at the
inspiration for this project, &lt;A HREF=&quot;http://www.tor.com/index.php?option=com_content&amp;view=blog&amp;id=9473&quot;&gt;the &lt;CITE&gt;Lord of the Rings&lt;/CITE&gt; re-read&lt;/A&gt;, but I suspect that one
would be equally compelling.&lt;/P&gt;</description><category>books</category><category>wheel of time</category></item></channel></rss>
