peteg's blog - AYAD


Website launch.

We're famous, we've got the top hit on Google Việt Nam for "DRD", and on the front page for Google.com. The launch went fairly well, with demonstrations of the "zoom" 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.

/AYAD/Project | Link


DRD Website Mới live.

Partly by accident, partly by design, the new DRD 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.

/AYAD/Project | Link


Project blah blah.

I've been reading a lot of accessibility articles. Most are (at best) unscientific. If you can cope with the outmoded HTML advice, the best is Joe Clark's Building Accessible Websites. I feel his treatment of colour blindness is ... excessive, in a good way.

Finally someone has cooked up a good explanation of how to stuff Flash into a webpage, and why <embed> lurches forever onward. It has convinced me that if one decides to be evil and use Flash, one must necessarily also use JavaScript.

My goal of actually putting the XML part of XHTML to work by validating the comments and general content coming into HOPE with HaXml is mostly working, modulo some bugs here and there. Break it here: http://210.245.124.74/~drdviet/hope/ (soon to become the main DRD site, I hope.)

/AYAD/Project | Link


The I'm-in-a-hurry guide to accessibility.

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

I slightly quibble with his advice on access keys (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.

/AYAD/Project | Link


To accesskey or not to accesskey...

An accesskey is another of the W3'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 prevailing wisdom is not to use accesskeys as the implementations are broken; in a nutshell, this misfeature is not compositional, a feature shared with all the very worst XHTML ideas.

Back in the real world we're stuck between doing something "many users will be familiar with" (yeah, I remember that) and leaving things alone. I've decided to follow the BBC's ambivalent lead here.

/AYAD/Project | Link


Lazy CSV Parsing in Haskell.

One of the fun bits about this project is the text munging that comes with it. The regexp libraries for Haskell have super-sophisticated do-what-I-think-you-mean interfaces and not enough (simple) use-cases in the docs. Couple that with my concerns about Unicode support and I'm stuck doing it the very old fashioned way.

OK, enough editorialising; I've written a mostly-{RFC 4810, Haskell 98}-compliant lazy CSV parser that appears to work OK on reasonable-sized inputs. Existing solutions use Parsec, 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 Unicode data I need to import consumes a ridiculous amount of memory, even with GHC's optimiser going full-bore.

You can find it here. The licence is BSD. Couple it with the appropriate utf8-string for your GHC and it works well on UTF-8-encoded files.

Now, to track down a nasty memory leak somewhere in the database code... the profiler tells me SYSTEM is hanging onto some stuff, but not what SYSTEM actually is. Err, what did Fergus say again?

/AYAD/Project | Link


Simplifying the XHTML DTD for fun and profit.

For the usual reasons it seemed best to use FCKeditor as an input widget for HOPE. I had hoped to provide some kind of hacker-friendly markup but time is short and convincing FCKeditor to generate it would probably require some heart surgery. So XHTML everywhere it is.

Clearly this path should lead to paranoia; we can't allow users to submit arbitary strings, or even arbitary XHTML. My heavyweight solution is to validate such submissions against a stripped-down XHTML DTD using HaXml. So far I've removed forms, scripts and restricted the attributes of <a> to just href. I wish the DTD was readable; it is merely an algebraic data type afterall.

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.

You can try your hand here. Any and all feedback is much appreciated.

In related news I've uploaded my FCKeditor "server-side integration" Haskell library to Hackage. Find that here.

/AYAD/Project | Link


Trung Nguyên: 301B An Dương Vương, District 5.

Fellow-and-soon-to-be-ex-AYAD Yen steered me to this seedy old man's café quite near my usual and increasingly dear 603. While ancient, I wasn't calcified enough to last long at this place. They only serve the one type of Trung Nguyên coffee, which is a bit punk.

/AYAD/HCMC/Cafes | Link


Café Du Miên, 48/9A Hồ Biểu Chánh, District Phú Nhuận.

Chị Lan (my AYAD In-Country Manager) took us to this café on our first morning in Hồ Chí Minh City, way back in July 2007. It's a friend of Cà Phê Thềm Xưa. I went there today with Loan. We played a few games of Carcassonne (which I'd given her for her birthday) and chatted about xe ba bánh.

/AYAD/HCMC/Cafes | Link


Vale, 1 Trần Hưng Đạo.

Well, somewhere in Hồ Chí Minh City a contract quietly expired and the Trung Nguyên at 1 Trần Hưng Đạo in District 1 is no more. The love heart on the front door and Trung Nguyên paraphernalia have been removed.

I now reside at 603 Trần Hưng Đạo, on the edge of District 1. Unfortunately they don't do food.

/AYAD/HCMC/Cafes | Link


Trung Nguyên: Corner of Hồng Bàng and Đồ Ngọc Thạnh, District 5.

A small corner-café in the west of District 5 (aka Chợ Lớn and Chinatown). Nothing especially remarkable, except for being on a big fat noisy road.

/AYAD/HCMC/Cafes | Link


Ah, back in Hồ Chí Minh City. The relatively-expensive JetStar flight back to Sydney in early February was absolutely full, with loads of Vietnamese people presumably travelling to visit their families for Tết. Conversely the relatively-cheap flight back yesterday was about one-quarter empty, consisting mostly of Australian and European tourists, to judge by accents and appearances.

The streets look different, I've moved digs, but the coffee remains as good as ever.

/AYAD | Link


People like their webpages the way they like their streets.

I went to visit Marc today, at the Prince of Wales Hospital, 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.

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

/AYAD/Project | Link


What a strange confluence: tomorrow is both Super Tuesday, apparently a singular day in the selection of the President of the Free World, and Tết, the Lunar New Year. The streets of Hồ Chí Minh City are full of people, the parks full of (arranged) blooms. Like the Swedes, the people of Việt Nam party hard on the night before and have a quiet time on the day itself. I go back to Australia tomorrow, so no Tết for me.

/AYAD | Link


Dolls from Hà Nội, or more "what one reads in Việt Nam News".

I bought a Sunday's Việt Nam News a month ago, and fortuitously found out about a lady making dolls in Hà Nội. I wanted to buy a couple for my mother, and so Loan organised for one of her mates to purchase them, and Chi Yen brought them back to Hồ Chí Minh City.

/AYAD/Disability-Projects | Link


HOPE in a host(ile) environment.

I finally managed to get HOPE to statically link. Björn does this against MySQL, so the infrastructure was there, but Debian's PostgreSQL binary packages are built with Kerberos support, and apparently libkrb5-dev no longer supports static linking. I rebuilt them with all that switched off (thanks Debian, that was pretty easy), and now the linker seems happy. The hazards of binary packaging...

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

Next up: what happens when /etc/hosts is MIA? How do I talk to the database server? I begin to understand why everyone sticks to PHP and MySQL, and why Ruby on Rails's convention-based approach is such a big deal.

/AYAD/Project | Link


Trung Nguyên: 349-351 Hai Bà Trưng, District 3.

An "official" one, right opposite the markets, near the church, on the corner of Trần Quốc Toản. I tried coming here before but it was closed for renovations. Quite a pleasant space, somewhat like the downtown one on Hồ Tùng Mậu.

/AYAD/HCMC/Cafes | Link


Trung Nguyên: 136 Lý Chính Thắng, District 3.

Yet another franchise café on the backroad to the top end of Hai Bà Trưng. Quite comfortable, but small and not especially anything. It has a friend, presumably run by the same people, at 112 Trần Quốc Thảo, also in District 3.

/AYAD/HCMC/Cafes | Link


Trung Nguyên: 10SC 3 Tháng 2, District 10.

I'd been meaning to go here for ages, and had my chance to have a lazy early-Saturday afternoon visit with Tigon. This one's a bit weird, a small open garden courtyard-café completely ringed by a building. It's quite pleasant.

There's another one down the road, out the front of a hotel, that apparently I haven't written up...

By the way, make sure to go to number 10, southwest of Cao Thắng. This number 10 is a mechanic.

/AYAD/HCMC/Cafes | Link


Trung Nguyên: 2-4 Cửu Long, District Tân Bình.

Had a brief stop at this sort-of garden café on the way to dropping Loan off at the (old, now domestic-only) airport. It's on a side-street off the main drag going to the airport, and hence is quite pleasant.

/AYAD/HCMC/Cafes | Link