<?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   2008-01-17-StaticLinkingBlues.autumn</title>
    <link>http://peteg.org/blog</link>
    <description></description>
    <language>en</language>

  <item>
    <title>Rounding up some press.</title>
    <link>http://peteg.org/blog/2008/07/01#2008-07-01-PhuNu</link>
    <category>/AYAD/Project</category>
    <description>
&lt;p&gt;

&lt;img
src=&quot;http://www.baophunu.org.vn/FileManage/Cache/Image/25/4025_0x0.jpg&quot;
height=&quot;273&quot; width=&quot;400&quot; style=&quot;float:left; margin: 5px&quot; alt=&quot;Chị Yến,
Triêu and me.&quot; /&gt;

I was &lt;a
href=&quot;http://www.baophunu.org.vn/Tianyon/Index.aspx?ArticleID=3564&amp;amp;ChannelID=7&quot;&gt;interviewed&lt;/a&gt;
for the women's newspaper, &lt;a href=&quot;http://www.baophunu.org.vn/&quot;
class=&quot;title&quot;&gt;Phunữ&lt;/a&gt;. Left-to-right in the photo: DRD Director Chị
Yến, my counterpart Triêu and me, and the &lt;a href=&quot;http://www.apple.com/macbook/&quot;&gt;MacBook&lt;/a&gt; in the
foreground, of course. We're seated in the corner of the &lt;a href=&quot;http://drdvietnam.com/&quot;&gt;DRD&lt;/a&gt;
office. I asked the journalist to publish my email address but sadly
she did not.

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

More press coverage at &lt;a
href=&quot;http://www.tuoitre.com.vn/Tianyon/Index.aspx?ArticleID=266154&amp;amp;ChannelID=16&quot;&gt;Tuổi
Trẻ&lt;/a&gt; and &lt;a
href=&quot;http://www.daily.com.vn/news/entry/5X5H-u4u2M5I4P2h0_6_5_5_W_3_5_Q_3_5_a_3_a_6_5_a_E_E/da%20co%20mot%20thu%20vien%20dien%20tu%20cho%20nguoi%20khuyet%20tat&quot;&gt;Daily.com.vn&lt;/a&gt;. I
guess this means my &lt;a href=&quot;http://www.ayad.com.au/&quot;&gt;AYAD&lt;/a&gt; project was a success.

&lt;/p&gt;</description>
  </item>
  <item>
    <title>Website launch.</title>
    <link>http://peteg.org/blog/2008/06/29#2008-06-29-Launch</link>
    <category>/AYAD/Project</category>
    <description>
&lt;p&gt;

We're famous, we've got the &lt;a
href=&quot;http://www.google.com.vn/search?q=drd&quot;&gt;top hit on Google Việt
Nam for &quot;DRD&quot;&lt;/a&gt;, and on &lt;a
href=&quot;http://www.google.com/search?q=drd&quot;&gt;the front page for
Google.com&lt;/a&gt;. The launch went fairly well, with demonstrations of
the &quot;zoom&quot; layout and the JAWS screen reader, and good attendence by
the press. There were some good questions and I was exhausted by the
end of it.

&lt;/p&gt;</description>
  </item>
  <item>
    <title>&lt;a href=&quot;http://drdvietnam.com/&quot;&gt;DRD&lt;/a&gt; Website Mới live.</title>
    <link>http://peteg.org/blog/2008/06/24#2008-06-24-WebsiteLive</link>
    <category>/AYAD/Project</category>
    <description>
&lt;p&gt;

Partly by accident, partly by design, the new &lt;a href=&quot;http://drdvietnam.com/&quot;&gt;DRD&lt;/a&gt; website is now
live. It has some remaining rough edges which I'll be ironing out this
week and next. We'll have a launch press conference this Sunday, June
29. Any and all feedback is very welcome.

&lt;/p&gt;</description>
  </item>
  <item>
    <title>Project blah blah.</title>
    <link>http://peteg.org/blog/2008/05/21#2008-05-21-Update</link>
    <category>/AYAD/Project</category>
    <description>
&lt;p&gt;

I've been reading a lot of accessibility articles. Most are (at best)
unscientific. If you can cope with the outmoded &lt;a href=&quot;http://www.w3.org/&quot;&gt;HTML&lt;/a&gt; advice, the
best is Joe Clark's &lt;a href=&quot;http://joeclark.org/book/&quot;
class=&quot;title&quot;&gt;Building Accessible Websites&lt;/a&gt;. I feel his treatment
of colour blindness is ... excessive, in a good way.

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

Finally someone has cooked up a good explanation of &lt;a
href=&quot;http://www.alistapart.com/articles/flashembedcagematch/&quot;&gt;how to
stuff Flash into a webpage&lt;/a&gt;, and why &lt;code&gt;&amp;lt;embed&amp;gt;&lt;/code&gt;
lurches forever onward. It has convinced me that if one decides to be
evil and use Flash, one must necessarily also use &lt;a href=&quot;http://en.wikipedia.org/wiki/JavaScript&quot;&gt;JavaScript&lt;/a&gt;.

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

My &lt;a href=&quot;http://peteg.org/blog/AYAD/Project/2008-03-23-XHtml.autumn&quot;&gt;goal&lt;/a&gt; of actually putting the &lt;a href=&quot;http://www.w3.org/XML/&quot;&gt;XML&lt;/a&gt; part of &lt;a href=&quot;http://www.w3.org/1999/xhtml&quot;&gt;XHTML&lt;/a&gt; to work
by validating the comments and general content coming into &lt;a href=&quot;http://hope.bringert.net/&quot;&gt;HOPE&lt;/a&gt;
with &lt;a href=&quot;http://www.cs.york.ac.uk/fp/HaXml/&quot;&gt;HaXml&lt;/a&gt; is mostly working, modulo some bugs here and
there. Break it here: &lt;a
href=&quot;http://210.245.124.74/~drdviet/hope/&quot;&gt;http://210.245.124.74/~drdviet/hope/&lt;/a&gt;
(soon to become the main &lt;a href=&quot;http://drdvietnam.com/&quot;&gt;DRD&lt;/a&gt; site, I hope.)

&lt;/p&gt;</description>
  </item>
  <item>
    <title>The I'm-in-a-hurry guide to accessibility.</title>
    <link>http://peteg.org/blog/2008/04/17#2008-04-17-Accessibility</link>
    <category>/AYAD/Project</category>
    <description>
&lt;p&gt;

I've been warmly surprised by some of the general-topics things I've
found on the net recently; either &lt;a href=&quot;http://www.google.com/&quot;&gt;Google&lt;/a&gt;'s search results are
tending away from waffle or I am becoming very adept at closing tabs
and flushing the short-term memory buffer. &lt;a
href=&quot;http://diveintoaccessibility.org/&quot; class=&quot;title&quot;&gt;Dive into
Accessibility&lt;/a&gt; is straightfoward and the tips mostly directly
applicable. Unfortunately it has dated a bit; I shudder to think that
there are too many &lt;a href=&quot;http://www.w3.org/&quot;&gt;HTML&lt;/a&gt; 4 websites out there that people now want
to make accessible...

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

I slightly quibble with his advice on &lt;a href=&quot;http://peteg.org/blog/AYAD/Project/2008-04-13-AccessKeys.autumn&quot;&gt;access
keys&lt;/a&gt; (Day 15, p32 of the PDF), where he suggests that a stroke
survivor may make use of them. I expect there are many people who
struggle to make key chords, especially those having the use of just
one hand.

&lt;/p&gt;</description>
  </item>
  <item>
    <title>To &lt;a href=&quot;http://en.wikipedia.org/wiki/Access_keys&quot;&gt;&lt;code&gt;accesskey&lt;/code&gt;&lt;/a&gt; or not to &lt;a href=&quot;http://en.wikipedia.org/wiki/Access_keys&quot;&gt;&lt;code&gt;accesskey&lt;/code&gt;&lt;/a&gt;...</title>
    <link>http://peteg.org/blog/2008/04/13#2008-04-13-AccessKeys</link>
    <category>/AYAD/Project</category>
    <description>
&lt;p&gt;

An &lt;a href=&quot;http://en.wikipedia.org/wiki/Access_keys&quot;&gt;&lt;code&gt;accesskey&lt;/code&gt;&lt;/a&gt; is another of the &lt;a href=&quot;http://www.w3.org/&quot;&gt;W3&lt;/a&gt;'s ways of muddling concerns;
when you type something into a web browser, what does it mean? Does
the browser get the keystroke or the page, or the form, and which form
are we talking about anyway... It seems the &lt;a
href=&quot;http://www.cs.tut.fi/~jkorpela/forms/accesskey.html&quot;&gt;prevailing
wisdom&lt;/a&gt; is not to use &lt;a href=&quot;http://en.wikipedia.org/wiki/Access_keys&quot;&gt;&lt;code&gt;accesskey&lt;/code&gt;&lt;/a&gt;s as the implementations are
broken; in a nutshell, this misfeature is not &lt;a href=&quot;http://www.seop.leeds.ac.uk/entries/compositionality/&quot;&gt;compositional&lt;/a&gt;, a
feature shared with all the very worst &lt;a href=&quot;http://www.w3.org/1999/xhtml&quot;&gt;XHTML&lt;/a&gt; ideas.

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

Back in the real world we're stuck between doing something &quot;&lt;a
href=&quot;http://www.alistapart.com/articles/accesskeys/&quot;&gt;many users will
be familiar with&lt;/a&gt;&quot; (yeah, I remember that) and leaving things
alone. I've decided to follow the &lt;a href=&quot;http://www.bbc.co.uk/&quot;&gt;BBC&lt;/a&gt;'s &lt;a
href=&quot;http://www.bbc.co.uk/accessibility/accesskeys/keys.shtml&quot;&gt;ambivalent
lead&lt;/a&gt; here.

&lt;/p&gt;</description>
  </item>
  <item>
    <title>Lazy &lt;a href=&quot;http://en.wikipedia.org/wiki/Comma-separated_values&quot;&gt;CSV&lt;/a&gt; Parsing in &lt;a href=&quot;http://haskell.org/&quot;&gt;Haskell&lt;/a&gt;.</title>
    <link>http://peteg.org/blog/2008/04/11#2008-04-11-LazyCSVParser</link>
    <category>/AYAD/Project</category>
    <description>
&lt;p&gt;

One of the fun bits about this project is the text munging that comes
with it. The &lt;a href=&quot;http://en.wikipedia.org/wiki/Regular_expression&quot;&gt;regexp&lt;/a&gt; libraries for &lt;a href=&quot;http://haskell.org/&quot;&gt;Haskell&lt;/a&gt; have
super-sophisticated do-what-I-think-you-mean interfaces and not enough
(simple) use-cases in the docs. Couple that with my &lt;a href=&quot;http://peteg.org/blog/AYAD/Project/2007-12-06-HOPE-Unicode.autumn&quot;&gt;concerns
about Unicode support&lt;/a&gt; and I'm stuck doing it the very old
fashioned way.

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

OK, enough editorialising; I've written a mostly-{&lt;a
href=&quot;http://www.rfc-editor.org/rfc/rfc4180.txt&quot;&gt;RFC 4810&lt;/a&gt;, &lt;a href=&quot;http://www.haskell.org/onlinereport/&quot;&gt;Haskell 98&lt;/a&gt;}-compliant lazy &lt;a href=&quot;http://en.wikipedia.org/wiki/Comma-separated_values&quot;&gt;CSV&lt;/a&gt; parser that appears to work OK on
reasonable-sized inputs. Existing solutions use &lt;a href=&quot;http://legacy.cs.uu.nl/daan/parsec.html&quot;&gt;Parsec&lt;/a&gt;, whose
return type seems to guarantee that more-or-less the entire output
must reside in memory at some point. This might be OK for small files,
but the 6Mb of &lt;a href=&quot;http://unicode.org/&quot;&gt;Unicode&lt;/a&gt; data I need to import consumes a ridiculous
amount of memory, even with &lt;a href=&quot;http://haskell.org/ghc/&quot;&gt;GHC&lt;/a&gt;'s optimiser going full-bore.

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

You can find it &lt;a
href=&quot;http://peteg.org/haskell/hope/site/Import/CSV.hs&quot;&gt;here&lt;/a&gt;. The
licence is &lt;a href=&quot;http://www.bsd.org/&quot;&gt;BSD&lt;/a&gt;. Couple it with the appropriate &lt;a
href=&quot;http://hackage.haskell.org/cgi-bin/hackage-scripts/package/utf8-string-0.3&quot;&gt;utf8-string&lt;/a&gt;
for your &lt;a href=&quot;http://haskell.org/ghc/&quot;&gt;GHC&lt;/a&gt; and it works well on &lt;a href=&quot;http://en.wikipedia.org/wiki/UTF-8&quot;&gt;UTF-8&lt;/a&gt;-encoded files.

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

Now, to track down a nasty memory leak somewhere in the database
code... the profiler tells me &lt;code&gt;SYSTEM&lt;/code&gt; is hanging onto some
stuff, but not what &lt;code&gt;SYSTEM&lt;/code&gt; actually is. Err, what did &lt;a href=&quot;http://www.cs.mu.oz.au/~fjh/&quot;&gt;Fergus&lt;/a&gt; &lt;a
href=&quot;http://www.haskell.org/pipermail/haskell/2004-June/014239.html&quot;&gt;say
again&lt;/a&gt;?

&lt;/p&gt;</description>
  </item>
  <item>
    <title>Simplifying the &lt;a href=&quot;http://www.w3.org/1999/xhtml&quot;&gt;XHTML&lt;/a&gt; &lt;a href=&quot;http://en.wikipedia.org/wiki/Document_Type_Definition&quot;&gt;DTD&lt;/a&gt; for fun and profit.</title>
    <link>http://peteg.org/blog/2008/03/23#2008-03-23-XHtml</link>
    <category>/AYAD/Project</category>
    <description>
&lt;p&gt;

For the usual reasons it seemed best to use &lt;a href=&quot;http://www.fckeditor.net/&quot;&gt;FCKeditor&lt;/a&gt; as an input
widget for &lt;a href=&quot;http://hope.bringert.net/&quot;&gt;HOPE&lt;/a&gt;. I had hoped to provide some kind of
hacker-friendly markup but time is short and convincing &lt;a href=&quot;http://www.fckeditor.net/&quot;&gt;FCKeditor&lt;/a&gt;
to generate it would probably require some heart surgery. So &lt;a href=&quot;http://www.w3.org/1999/xhtml&quot;&gt;XHTML&lt;/a&gt;
everywhere it is.

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

Clearly this path should lead to paranoia; we can't allow users to
submit arbitary strings, or even arbitary &lt;a href=&quot;http://www.w3.org/1999/xhtml&quot;&gt;XHTML&lt;/a&gt;. My heavyweight
solution is to validate such submissions against a stripped-down &lt;a href=&quot;http://www.w3.org/1999/xhtml&quot;&gt;XHTML&lt;/a&gt; &lt;a href=&quot;http://en.wikipedia.org/wiki/Document_Type_Definition&quot;&gt;DTD&lt;/a&gt; using &lt;a href=&quot;http://www.cs.york.ac.uk/fp/HaXml/&quot;&gt;HaXml&lt;/a&gt;. So far I've removed forms, scripts and
restricted the attributes of &lt;code&gt;&amp;lt;a&amp;gt;&lt;/code&gt; to just
&lt;code&gt;href&lt;/code&gt;. I wish the &lt;a href=&quot;http://en.wikipedia.org/wiki/Document_Type_Definition&quot;&gt;DTD&lt;/a&gt; was readable; it is merely an &lt;a href=&quot;http://en.wikipedia.org/wiki/Algebraic_data_type&quot;&gt;algebraic data type&lt;/a&gt; afterall.

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

Combined with some thorough string-escaping for the other inputs and a
tendency to cop-out (crash) on anything that doesn't completely
conform to expectations, I think we will be all right.

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

You can try your hand &lt;a
href=&quot;http://210.245.124.74/~drdviet/hope/en/&quot;&gt;here&lt;/a&gt;. Any and all
feedback is much appreciated.

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

In related news I've uploaded my &lt;a href=&quot;http://www.fckeditor.net/&quot;&gt;FCKeditor&lt;/a&gt; &quot;server-side
integration&quot; &lt;a href=&quot;http://haskell.org/&quot;&gt;Haskell&lt;/a&gt; library to &lt;a href=&quot;http://hackage.haskell.org/&quot;&gt;Hackage&lt;/a&gt;. Find that &lt;a
href=&quot;http://hackage.haskell.org/cgi-bin/hackage-scripts/package/fckeditor-0.1&quot;&gt;here&lt;/a&gt;.

&lt;/p&gt;</description>
  </item>
  <item>
    <title>People like their webpages the way they like their streets.</title>
    <link>http://peteg.org/blog/2008/02/21#2008-02-21-Webpages</link>
    <category>/AYAD/Project</category>
    <description>
&lt;p&gt;

I went to visit Marc today, at the &lt;a href=&quot;http://www.sesahs.nsw.gov.au/powh/&quot;&gt;Prince of Wales Hospital&lt;/a&gt;, and we got
around to talking about design. Roughly speaking, it seems to me that
people tend to like their webpages the same way they like their
streets. In Australia, and perhaps the West in general, we want order,
clearly marked lanes, pedestrian crossings, accessibility in the form
of kerb cuts and beeping and flashing attention-getting devices. The
footpaths are clear of stalls and coffee merchants. Conversely Asia
seems to prefer craziness, where finding things is difficult but what
you do find is sometimes more valuable than what you set out for. As
Marc observed, one uses fifty fonts to show that one is more
prosperous than the guys who only used forty-nine, and damn that
street food (mystery meat) is tasty.

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

I'm going to have to face up to the tension between Vietnamese website
aesthetics and aspirations to accessibility rather soon.

&lt;/p&gt;</description>
  </item>
  <item>
    <title>&lt;a href=&quot;http://hope.bringert.net/&quot;&gt;HOPE&lt;/a&gt; in a host(ile) environment.</title>
    <link>http://peteg.org/blog/2008/01/17#2008-01-17-StaticLinkingBlues</link>
    <category>/AYAD/Project</category>
    <description>
&lt;p&gt;

I finally managed to get &lt;a href=&quot;http://hope.bringert.net/&quot;&gt;HOPE&lt;/a&gt; to statically link. &lt;a href=&quot;http://www.dtek.chalmers.se/~d00bring/&quot;&gt;Bj&amp;ouml;rn&lt;/a&gt; does
this against &lt;a href=&quot;http://www.mysql.com/&quot;&gt;MySQL&lt;/a&gt;, so the infrastructure was there, but &lt;a href=&quot;http://www.debian.org/&quot;&gt;Debian&lt;/a&gt;'s &lt;a href=&quot;http://www.postgresql.org/&quot;&gt;PostgreSQL&lt;/a&gt; binary packages are built with &lt;a href=&quot;http://web.mit.edu/Kerberos/&quot;&gt;Kerberos&lt;/a&gt;
support, and apparently &lt;code&gt;libkrb5-dev&lt;/code&gt; no longer supports
static linking. I rebuilt them with all that switched off (thanks &lt;a href=&quot;http://www.debian.org/&quot;&gt;Debian&lt;/a&gt;, that was pretty easy), and now the linker seems happy. The
hazards of binary packaging...

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

So, why bother with this at all? Well, the company that will host &lt;a href=&quot;http://drdvietnam.com/&quot;&gt;DRD&lt;/a&gt;'s new website apparently doesn't have &lt;a href=&quot;http://gmplib.org/&quot;&gt;GMP&lt;/a&gt; installed. This
threw me a bit; I expected it to be missing all sorts of stuff, but &lt;a href=&quot;http://gmplib.org/&quot;&gt;GMP&lt;/a&gt;? I have been using &lt;a href=&quot;http://haskell.org/ghc/&quot;&gt;GHC&lt;/a&gt; for too long it seems. Sure, I could
try to arrange for the shared library to be present, or statically
link just &lt;a href=&quot;http://gmplib.org/&quot;&gt;GMP&lt;/a&gt; in, but it seemed better to insulate &lt;a href=&quot;http://hope.bringert.net/&quot;&gt;HOPE&lt;/a&gt; from
any other changes in the hostile environment with too much overkill,
rather than not enough.

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

Next up: what happens when &lt;code&gt;/etc/hosts&lt;/code&gt; is MIA? How do I
talk to the database server? I begin to understand why everyone sticks
to &lt;a href=&quot;http://www.php.net/&quot;&gt;PHP&lt;/a&gt; and &lt;a href=&quot;http://www.mysql.com/&quot;&gt;MySQL&lt;/a&gt;, and why &lt;a href=&quot;http://www.rubyonrails.org/&quot;&gt;Ruby on Rails&lt;/a&gt;'s convention-based approach
is such a big deal.

&lt;/p&gt;</description>
  </item>
  </channel>
</rss>
