Archive for July, 2006

07/11 Bug in Bloglines? Or in the feed?

See this extract of an Atom feed:

<entry xml:base=’When/200x/2006/07/10/’>
<title>Comments on Camping</title>
<link href=’Gone-Camping’ />
<id>http://www.tbray.org/ongoing/When/200x/2006/07/10/Gone-Camping</id>
<published>2006-07-10T13:00:00-07:00</published>
[…]</entry>

Bloglines reconstructs the link as http://www.tbray.org/ongoing/Gone-Camping [which fails]. Shouldn’t the reconstructed link be xml:base + link? Or just use id?

07/11 sqlite3 in Fink

Sigh, Fink doesn’t seem to know about SQLite3. OK, go get ’er. Download. Make a separate directory to build in? Well, then: ../sqlite-3.3.6/configure, make, sudo make install, OK.
in Ongoing: Comments on Camping

dda@/Users/dda > fink list | grep -i sqlite3
        dbd-sqlite-pm581        1.08-2  Self Contained RDBMS (based on SQLite3)
        dbd-sqlite-pm584        1.08-2  Self Contained RDBMS (based on SQLite3)
        dbd-sqlite-pm586        1.08-2  Self Contained RDBMS (based on SQLite3)
 i      sqlite3 3.2.8-1 Embedded SQL database, version 3
 i      sqlite3-dev     3.2.8-1 Embedded SQL database (include files and linkable libraries)
 i      sqlite3-doc     3.2.8-1 Embedded SQL database (HTML documentation)
 i      sqlite3-shlibs  3.2.8-1 Embedded SQL database (shared libraries)
        sqlite3-tcl     3.2.8-1 Embedded SQL database (Tcl/Tk bindings)

You probably need to update the package database and/or Fink itself. When in doubt, http://pdb.finkproject.org/pdb/search.php?summary=sqlite3

07/10 No more pasta or pizza – for awhile

Bloody Italians, they deserve an embargo on pasta and pizza. Even better, from now on I am doing things to pasta that would make their mamas scream and cry. Like using linguine as an ingredient of my fiery Chinese Sichuan noodles. THAT should teach ‘em.

07/10 X-Encodings in Erlang/mb

Been hard at it. But I hit a snag when encountering a plain, innocuous-looking sinogram: 內. Pretty harmless, right? D’uh. Big time. Because in giapponese it’s 内, not 內. Friggin’ variants. 0×5167 vs 0×5185 [If you don’t know what I am talking about, it’s okay. In this case, ignorance is bliss!]. Can I slap someone – preferrably not me? Say hello to hasVariant(X) who just joined us. Nyessss…. Anyway, all fixed now – or rather, for now!

A couple of screenshots is worth 1,000 words!

Here’s a screenshot of the source of KanjiTest.html, in SEE. It’s a cross-table of a few sinograms for a slew of encodings, showing the respective code points for each character in all the encodings. The page itself is in utf-8.
KanjiTest.html screenshot

Here’s a screenshot of the source of KanjiTestUTF8.html. An extract of the former table, if you will.
KanjiTestUTF8.html screenshot

Look, Mom, with only one hand: a UTF-16 encoded page showing a table of sinograms, in UTF-16 of course.
KanjiTestUTF16.html screenshot

Ooooh, lookit, no hands! Same sinograms, in Shift-JIS. Damn, I rock!
KanjiTestSJ.html screenshot

It’s not exactly rosy. The code’s a deluxe candidate for refactoring – read, it’s a mess – but is written in a way that can handle easily as many new encodings as you can throw at me, provided you give me a UTF-8/16 to said encoding cross-ref file. The whole yahzoo [case folding data, Big5, CCCII, Shift-JIS, EUC-KR] is stored in dets tables – UTF-16⇔UTF-8 is an algorithm, thus a tad faster. Because this thing, it’s nice to have, but not exactly a Ferrari. The test that produces these tables, it runs in, ahem, er…, 14 seconds? Don’t reach for your gun right now though, because:
A. I am going to work on speed when functionalities are all in and tested
B. Try to do that right now in Erlang :D – good luck!

So I guess slow is better than nothing. But we’ll work on speed.

Erlang

07/08 Erlang multi-byte module, continued

There are still many dusty corners, and some major refactoring to do, but it is going well, very well indeed.

Erlang