<?xml version="1.0"?>
<!-- name="generator" content="blosxom/2.0.2" -->
<!DOCTYPE rss PUBLIC "-//Netscape Communications//DTD RSS 0.91//EN" "http://my.netscape.com/publish/formats/rss-0.91.dtd">

<rss version="0.91">
  <channel>
    <title>peteg's blog   2007-11-27-XSLT-Turing-Complete.autumn</title>
    <link>http://peteg.org/blog</link>
    <description></description>
    <language>en</language>

  <item>
    <title>&lt;a href=&quot;http://en.wikipedia.org/wiki/XSL_Transformations&quot;&gt;XSLT&lt;/a&gt; is &lt;a href=&quot;http://en.wikipedia.org/wiki/Turing_complete&quot;&gt;Turing Complete&lt;/a&gt;. So What?</title>
    <link>http://peteg.org/blog/2007/11/27#2007-11-27-XSLT-Turing-Complete</link>
    <category>/hacking</category>
    <description>
&lt;p&gt;

There are several proofs of this fact, such as &lt;a
href=&quot;http://www.idealliance.org/papers/extreme/proceedings/html/2006/Novatchev01/EML2006Novatchev01.html&quot;&gt;this
one from 2006&lt;/a&gt;. So, why would &lt;a href=&quot;http://www.ibm.com&quot;&gt;IBM&lt;/a&gt;'s &lt;a href=&quot;http://www.ibm.com/developerworks/&quot;&gt;DeveloperWorks&lt;/a&gt; publish
an &lt;a
href=&quot;http://www.ibm.com/developerworks/xml/library/x-matters14.html&quot;&gt;an
article that apparently says otherwise&lt;/a&gt; [*]?

&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;

Finally, XSLT is the familiar technique that, in a sense, best matches
the structure of XML. Perhaps reflecting this match, XSL documents are
themselves XML document instances. XSLT is a special-purpose
functional programming language that allows you to specify
transformations of XML documents into other things (especially, but
not only, into other XML documents). Aside from the somewhat annoying
verboseness of XSLT, it is limited in its expressiveness &amp;mdash; the
things you can say are expressed rather clearly (and functionally, not
procedurally), but you quickly bump up against all the things that you
simply cannot say in XSLT.

&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;

OK, so there is an appeal to a &lt;a href=&quot;http://en.wikipedia.org/wiki/Turing_tarpit&quot;&gt;Turing tarpit&lt;/a&gt; argument, but how
about that last phrase, the worrying &lt;em&gt;... all the things that you
simply cannot say in XSLT&lt;/em&gt;? Let's keep reading:

&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;

The problem comes as soon as you want to filter or compute something
for the output &amp;mdash; something that is not included in the few
comparisons available to XSLT. For example, maybe you want (in a
numerological spirit) to display only the even-numbered hexagrams, or
only the prime ones. With XSLT, you are out of luck for something this
simple.

&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;

So, what we have here is something like &lt;em&gt;control&lt;/em&gt; completeness
&amp;mdash; it has enough in the way of control flow constructs &amp;mdash;
but &lt;em&gt;data-incompleteness&lt;/em&gt; &amp;mdash; you can't munge your data in
all the ways you'd like to. This has always bothered me: how do you
prove that you have provided enough operations for your datatype? I'm
sure there are people studying &lt;a href=&quot;http://en.wikipedia.org/wiki/Algebraic_data_type&quot;&gt;algebraic data types&lt;/a&gt; and &lt;a href=&quot;http://en.wikipedia.org/wiki/Algebraic_specification&quot;&gt;algebraic specification&lt;/a&gt;
who have some answers for that.

&lt;/p&gt;
&lt;p&gt;

[*] As this article should make clear, the claim of &lt;a href=&quot;http://en.wikipedia.org/wiki/Turing_complete&quot;&gt;Turing Complete&lt;/a&gt;ness is weaker and slipperier than most people seem to
think.

&lt;/p&gt;</description>
  </item>
  <item>
    <title>The &lt;a href=&quot;http://www.apple.com/macosx/&quot;&gt;Mac OS X&lt;/a&gt; 10.4.11 Upgrade Killed My &lt;a href=&quot;http://www.apple.com/macbook/&quot;&gt;MacBook&lt;/a&gt;.</title>
    <link>http://peteg.org/blog/2007/11/17#2007-11-17-Leopard</link>
    <category>/hacking/mac</category>
    <description>
&lt;p&gt;

That's a first, a &lt;a href=&quot;http://www.apple.com/macosx/&quot;&gt;Mac OS X&lt;/a&gt; update that screwed things up so badly
the &lt;a href=&quot;http://www.apple.com/macbook/&quot;&gt;MacBook&lt;/a&gt; ceased to function. Oh well, I now know where an &lt;a href=&quot;http://www.apple.com/&quot;&gt;Apple&lt;/a&gt; store is in &lt;a href=&quot;http://www.hochiminhcity.gov.vn/&quot;&gt;Hồ Chí Minh City&lt;/a&gt;; I went to:

&lt;/p&gt;
&lt;pre&gt;
Thuan My Co. Ltd - Apple Authorised Reseller
98 Nguyễn Công Trứ, District 1, &lt;a href=&quot;http://www.hochiminhcity.gov.vn/&quot;&gt;Hồ Chí Minh City&lt;/a&gt;.
Tel: 84 8 8218936, 8218937
Fax: 84 8 8218937
Email: thuanmy-sales@hcm.fpt.vn
&lt;/pre&gt;
&lt;p&gt;

and tried to buy a copy, nay a &lt;em&gt;licence&lt;/em&gt;, of &lt;a href=&quot;http://en.wikipedia.org/wiki/Mac_OS_X_v10.5&quot;&gt;Leopard&lt;/a&gt;. I'll
spare you that story. The &quot;update&quot; function failed to work any magic
(or didn't like the caf&amp;eacute;s I went to), but the &quot;archive and
install&quot; thing did the trick. I get the impression that some database
in my old 10.4 installation got trashed.

&lt;/p&gt;&lt;p&gt;

Here are some fix-ups for &lt;a href=&quot;http://en.wikipedia.org/wiki/Mac_OS_X_v10.5&quot;&gt;Leopard&lt;/a&gt; from around the net (sorry for
the lack of attribution). Let's fix the Dock (make it look more like
Tiger's):

&lt;/p&gt;
&lt;pre&gt;

defaults write com.apple.dock no-glass -boolean YES
killall Dock

&lt;/pre&gt;
&lt;p&gt;

and the transparent menubar (cut and paste this line, then &amp;mdash;
eek! &amp;mdash; reboot):

&lt;/p&gt;
&lt;pre&gt;

sudo defaults write /System/Library/LaunchDaemons/com.apple.WindowServer 'EnvironmentVariables' -dict 'CI_NO_BACKGROUND_IMAGE' 0.63

&lt;/pre&gt;
&lt;p&gt;

Time machine claims to have done something but I haven't tried to use
it yet. Spaces is clunkier than I'd expect; using an app that sprays
windows around like Finder and expecting some kind of mid-90s &quot;raise&quot;
functionality is apparently asking too much. The wifi widget on the
menubar finally works like what every user of open networks wants it
to. Worth the money? Probably not, but heh, anything to get the &lt;a href=&quot;http://www.apple.com/macbook/&quot;&gt;MacBook&lt;/a&gt; back on its feet. That's the last time I travel without a &lt;a href=&quot;http://www.apple.com/macosx/&quot;&gt;Mac OS X&lt;/a&gt; DVD.

&lt;/p&gt;</description>
  </item>
  <item>
    <title>&lt;a href=&quot;http://www.skype.com/&quot;&gt;Skype&lt;/a&gt; and &lt;a href=&quot;http://www.paypal.com/&quot;&gt;PayPal&lt;/a&gt;.</title>
    <link>http://peteg.org/blog/2007/08/02#2007-08-02-Skype</link>
    <category>/hacking</category>
    <description>
&lt;p&gt;

I don't know why people &lt;a href=&quot;http://www.paypalsucks.com/&quot;&gt;hate
PayPal&lt;/a&gt;; perhaps they were evil in the past. (Actually, reading
that website makes me wish &lt;a href=&quot;http://www.visa.com/&quot;&gt;Visa&lt;/a&gt; et al. got properly into this
game.)  Anyway, as Vietnam doesn't seem to use phone cards, I wanted
to put some cash into &lt;a href=&quot;http://www.skype.com/&quot;&gt;Skype&lt;/a&gt; so I could call my parents. The
payment options are specific to the country where they guess your IP
is, and in Vietnam one cannot use &lt;a href=&quot;http://www.paypal.com/&quot;&gt;PayPal&lt;/a&gt; to pay &lt;a href=&quot;http://www.skype.com/&quot;&gt;Skype&lt;/a&gt;, though
&lt;a href=&quot;http://www.paypal.com/&quot;&gt;PayPal&lt;/a&gt; is happy for you to manipulate it from within Vietnam. The
only option usable to me &amp;mdash; Moneybookers &amp;mdash; asks for a
mobile phone number in Australia, which may or may not actually need
to be valid.

&lt;/p&gt;&lt;p&gt;

What to do? Well, fortunately the &lt;a href=&quot;http://www.skype.com/&quot;&gt;Skype&lt;/a&gt; website is accessible, and
the server hosting &lt;a href=&quot;http://peteg.org/&quot;&gt;peteg.org&lt;/a&gt; is in Australia, so I just used &lt;a href=&quot;http://links.sourceforge.net/&quot;&gt;links&lt;/a&gt; to punt some cash over. This setup is so stupid &amp;mdash; how
many ex-pats want to do the same thing? &amp;mdash; though I can
understand that &lt;a href=&quot;http://www.skype.com/&quot;&gt;Skype&lt;/a&gt; figures it's better to be safe than useful.

&lt;/p&gt;&lt;p&gt;

(Thanks &lt;a href=&quot;http://www.algorithm.com.au/&quot;&gt;Andr&amp;eacute;&lt;/a&gt;, thanks Adelaide.)

&lt;/p&gt;</description>
  </item>
  <item>
    <title>Die, &lt;a href=&quot;http://x.org/&quot;&gt;X11&lt;/a&gt;, die...</title>
    <link>http://peteg.org/blog/2007/07/30#2007-07-30-X11</link>
    <category>/hacking/mac</category>
    <description>
&lt;p&gt;

This whole &lt;a href=&quot;http://unicode.org/&quot;&gt;Unicode&lt;/a&gt; fiasco has finally killed &lt;a href=&quot;http://x.org/&quot;&gt;X11&lt;/a&gt; as a viable
option for me. I wouldn't have thought it was so very hard to provide
a complete set of easily-usable &lt;a href=&quot;http://unicode.org/&quot;&gt;Unicode&lt;/a&gt; fonts, but there it is.

&lt;/p&gt;&lt;p&gt;

So, on &lt;a href=&quot;http://www.algorithm.com.au/&quot;&gt;Andr&amp;eacute;&lt;/a&gt;'s advice, I've switched to:

&lt;/p&gt;
&lt;ul&gt;

&lt;li&gt;
&lt;p&gt;

&lt;a href=&quot;http://aquamacs.org/&quot;&gt;Aquamacs&lt;/a&gt;, &lt;a href=&quot;http://www.gnu.org/&quot;&gt;GNU&lt;/a&gt; &lt;a href=&quot;http://www.gnu.org/software/emacs/emacs.html&quot;&gt;Emacs&lt;/a&gt; with a shiny-happy &lt;a href=&quot;http://www.apple.com/macosx/&quot;&gt;Mac OS X&lt;/a&gt;
face. Apart from a lot of minor irritations that come with losing
about a decade's worth of &lt;a href=&quot;http://www.xemacs.org/&quot;&gt;XEmacs&lt;/a&gt; configuration, it seems quite
slick. I tried &lt;a href=&quot;http://members.shaw.ca/akochoi-xemacs/Carbon%20XEmacs/Home.html&quot;&gt;Carbon XEmacs&lt;/a&gt; but it doesn't support &lt;a href=&quot;http://unicode.org/&quot;&gt;Unicode&lt;/a&gt; out
of the box, and I refuse to spend (more) hours fiddling with it.

&lt;/p&gt;
&lt;/li&gt;

&lt;li&gt;
&lt;p&gt;

&lt;a href=&quot;http://software.jessies.org/terminator/&quot;&gt;Terminator&lt;/a&gt;, an &lt;a href=&quot;http://dickey.his.com/xterm/xterm.html&quot;&gt;xterm&lt;/a&gt;-alike written in &lt;a href=&quot;http://java.sun.com/&quot;&gt;Java&lt;/a&gt;, is possibly
the best thing ever to run on the &lt;a href=&quot;http://java.sun.com/docs/books/vmspec/&quot;&gt;JVM&lt;/a&gt;.

&lt;/p&gt;
&lt;/li&gt;

&lt;li&gt;
&lt;p&gt;

A new &lt;a href=&quot;http://www.gnu.org/software/bash/&quot;&gt;bash&lt;/a&gt; from &lt;a href=&quot;http://www.macports.org/&quot;&gt;MacPorts&lt;/a&gt; that speaks &lt;a href=&quot;http://unicode.org/&quot;&gt;Unicode&lt;/a&gt; better than
the crusty old one that comes with &lt;a href=&quot;http://www.apple.com/macosx/&quot;&gt;Mac OS X&lt;/a&gt; 10.4.x.

&lt;/p&gt;
&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;

Of course I'll still need &lt;a href=&quot;http://x.org/&quot;&gt;X11&lt;/a&gt; for sundry old-school things like &lt;a href=&quot;http://isabelle.in.tum.de/&quot;&gt;Isabelle&lt;/a&gt;, but there the pain is much less.

&lt;/p&gt;&lt;p&gt;

So, why &lt;a href=&quot;http://aquamacs.org/&quot;&gt;Aquamacs&lt;/a&gt; rather than a fancy closed-source editor? Well,
&lt;a href=&quot;http://macromates.com/&quot;&gt;TextMate&lt;/a&gt; crashed on me after about twenty minutes of use &amp;mdash; I
tried to open a file while saving-as another one, and was madly
switching programs trying to navigate the directory tree &amp;mdash; and
so I recall the cardinal rule of editors: anything less than twenty
years old hasn't been tested enough. Whether the (relatively shallow)
differences that &lt;a href=&quot;http://aquamacs.org/&quot;&gt;Aquamacs&lt;/a&gt; has to &lt;a href=&quot;http://www.gnu.org/&quot;&gt;GNU&lt;/a&gt; &lt;a href=&quot;http://www.gnu.org/software/emacs/emacs.html&quot;&gt;Emacs&lt;/a&gt; matter is
something I will soon discover.

&lt;/p&gt;</description>
  </item>
  <item>
    <title>&lt;a href=&quot;http://www.apple.com/ilife/iphoto/&quot;&gt;iPhoto&lt;/a&gt; &lt;a href=&quot;http://www.n8gray.org/code/scriptexport/&quot;&gt;Script Export&lt;/a&gt;</title>
    <link>http://peteg.org/blog/2007/07/15#2007-07-15-iPhoto</link>
    <category>/hacking/mac</category>
    <description>
&lt;p&gt;

This thing is magic: one can readily write a little script to (in my case)
copy images from &lt;a href=&quot;http://www.apple.com/ilife/iphoto/&quot;&gt;iPhoto&lt;/a&gt; into a &lt;a href=&quot;http://blosxom.ookee.com/blog/&quot;&gt;Blosxom&lt;/a&gt;-friendly location, and output
the requisite tags.

&lt;/p&gt;</description>
  </item>
  <item>
    <title>Accessing the &lt;a href=&quot;http://www.apple.com/macosx/&quot;&gt;Mac OS X&lt;/a&gt; paste buffer from the command line.</title>
    <link>http://peteg.org/blog/2007/06/05#2007-06-05-pbcopy</link>
    <category>/hacking/mac</category>
    <description>
If you have ever wanted to ship data to or from your &lt;a href=&quot;http://x.org/&quot;&gt;X11&lt;/a&gt; environment,
check out &lt;code&gt;pbcopy&lt;/code&gt; and &lt;code&gt;pbpaste&lt;/code&gt;. Now, if only X had a
&lt;a href=&quot;http://www.jwz.org/doc/x-cut-and-paste.html&quot;&gt;sane cut-and-paste
model&lt;/a&gt;, we'd be home...</description>
  </item>
  <item>
    <title>&lt;a href=&quot;http://www.mozilla.org/products/firefox/&quot;&gt;FireFox&lt;/a&gt; 1.5.0.11 &lt;a href=&quot;http://apple.com/&quot;&gt;Mac&lt;/a&gt;-optimised builds.</title>
    <link>http://peteg.org/blog/2007/04/18#2007-04-18-Firefox15</link>
    <category>/hacking/mac</category>
    <description>
I'm not a huge fan of the new &lt;a href=&quot;http://www.mozilla.org/products/firefox/&quot;&gt;FireFox&lt;/a&gt; (v2.x) for reasons that slip my
mind now. Fortunately a kind soul is &lt;a
href=&quot;http://www.furbism.com/firefoxmac/&quot;&gt;still cranking out optimised
builds&lt;/a&gt; for the &lt;a href=&quot;http://apple.com/&quot;&gt;Mac&lt;/a&gt;, sans fancy widgets.

</description>
  </item>
  <item>
    <title>&lt;a href=&quot;http://www.happypenguin.org/show?XKobo&quot;&gt;xkobo&lt;/a&gt; rides again.</title>
    <link>http://peteg.org/blog/2007/04/16#2007-04-16-xkobo</link>
    <category>/hacking</category>
    <description>
A vanilla &lt;a href=&quot;http://www.happypenguin.org/show?XKobo&quot;&gt;xkobo&lt;/a&gt; source tree failed to compile on the &lt;a href=&quot;http://www.apple.com/macbook/&quot;&gt;MacBook&lt;/a&gt;,
apparently due to some changes in &lt;a href=&quot;http://gcc.gnu.org/&quot;&gt;GCC&lt;/a&gt;'s C++ support over the last
fifteen years. Who'd have thunk it. Fortunately the industrious whitehats at
&lt;a href=&quot;http://www.openbsd.org/&quot;&gt;OpenBSD&lt;/a&gt; have produced &lt;a
href=&quot;http://www.openbsd.org/cgi-bin/cvsweb/ports/games/xkobo&quot;&gt;some
g++-placating patches&lt;/a&gt; that one can dredge from their &lt;code&gt;port&lt;/code&gt;
system. Joy.</description>
  </item>
  <item>
    <title>A shiny new &lt;a href=&quot;http://www.apple.com/macbook/&quot;&gt;MacBook&lt;/a&gt;.</title>
    <link>http://peteg.org/blog/2007/04/04#2007-04-04-MacBook</link>
    <category>/hacking</category>
    <description>
&lt;p&gt;

The storm this morning brought two things: &lt;a href=&quot;http://shimweasel.com/&quot;&gt;mrak&lt;/a&gt;'s much-talked-about
postcards, one from Qatar, the other from Vietnam, both posted in the last
week of his travels; and a man from &lt;a href=&quot;http://www.tnt.com/&quot;&gt;TNT Express Worldwide&lt;/a&gt; bearing a &lt;a href=&quot;http://www.apple.com/macbook/&quot;&gt;MacBook&lt;/a&gt;.

&lt;/p&gt;&lt;p&gt;

&lt;a href=&quot;http://www.apple.com/&quot;&gt;Apple&lt;/a&gt; has a strange way of managing expectations; the &lt;a href=&quot;http://store.apple.com/&quot;&gt;Apple Store&lt;/a&gt;
website told me it was late in shipping, but then the shipping itself took
one day instead of two or more. Anyway, they managed to suck me into buying
an &lt;a href=&quot;http://www.apple.com/ipod/&quot;&gt;iPod&lt;/a&gt; with a two hundred dollar discount so I guess they've earnt the
right to laugh at me.

&lt;/p&gt;&lt;p&gt;

I spent most of the day trying to reinstall everything, after I asked
Migration Assistant to ship all the crap in my home directory
over. Surprisingly &lt;a href=&quot;http://isabelle.in.tum.de/&quot;&gt;Isabelle&lt;/a&gt; installed with little hassle, and &lt;a href=&quot;http://www.apple.com/&quot;&gt;Apple&lt;/a&gt;'s new(er) &lt;a href=&quot;http://x.org/&quot;&gt;X11&lt;/a&gt; works pretty well. I was shocked to find how easy
it was to install &lt;a href=&quot;http://www.debian.org/&quot;&gt;Debian&lt;/a&gt; these days, even under (a trial version of) &lt;a href=&quot;http://store.apple.com/&quot;&gt;Parallels&lt;/a&gt;.

&lt;/p&gt;&lt;p&gt;

In short: it's bigger, heavier and much, much faster than the old &lt;a href=&quot;http://www.apple.com/ibook/&quot;&gt;iBook&lt;/a&gt;,
and the fan comes on pretty much as soon as you do anything serious. The
glossy screen seems to be OK; it's all about getting the angle right, like
&lt;a href=&quot;http://myspace.com/&quot;&gt;MySpace&lt;/a&gt;. The keyboard is actually quite fine too, despite
appearances. No regrets so far.

&lt;/p&gt;</description>
  </item>
  <item>
    <title>&lt;a href=&quot;http://www.algorithm.com.au/&quot;&gt;Andr&amp;eacute;&lt;/a&gt; on &lt;a href=&quot;http://www.apple.com/macosx/&quot;&gt;Mac OS X&lt;/a&gt; essentials.</title>
    <link>http://peteg.org/blog/2007/01/07#2007-01-07-Andre</link>
    <category>/hacking/mac</category>
    <description>
&lt;a href=&quot;http://www.algorithm.com.au/&quot;&gt;Andr&amp;eacute;&lt;/a&gt;'s been procrastinating about something, and so we all benefit
from his &lt;a href=&quot;http://www.algorithm.com.au/code/macosx/&quot;&gt;list of
tried-and-true Mac apps&lt;/a&gt;. Hmm... &lt;a href=&quot;http://www.xemacs.org/&quot;&gt;XEmacs&lt;/a&gt;-style Meta-/ for &lt;a href=&quot;http://developer.apple.com/cocoa/&quot;&gt;Cocoa&lt;/a&gt;
apps? It's all my Christmases come at once.</description>
  </item>
  </channel>
</rss>
