Versa by Deconstruction

I was recently compelled to write an introductory companion to the Versa specification. The emphasis for this document (located here) is with readers with little to no experience with formal language specifications and/or with the RDF data model. It is inspired by it's predecessors (which make good follow-up material):

I initially started using Open Office Writer to compose an Open Office Document and export it to an HTML document. But I eventually decided to write it in MarkDown and use pymarkdown to render it to an HTML document stored on Copia.

The original MarkDown source is here.

-- Chimezie

[Uche Ogbuji]

via Copia

Word to the Third

No gas face here, gee. Via Hans Nowak I learn that one of my favorite groups back in the day now has a fan site that does them some justice. 3rd Bass were always fun to listen to, what with their humor, and the killer hands they always had on the wheels and boards (The Bomb Squad, Prince Paul, and of course posse members Sam Sever and Daddy Rich). The endless obsession with Vanilla Ice wore a bit thin at times, but that's a minor glitch in an otherwise stellar career. Too bad they couldn't hold it all together for a few more albums.

Now all someone has to do is come up with a deserving site for the Poor Righteous Teachers, and I think I'll be all set for my favorites from that period (others such as Public Enemy and BDP are already well represented on the 'net).

Note: see also Hans' pointer to the history of sampling.

[Uche Ogbuji]

via Copia

Push vs pull XSLT

I often have to explain or refer to this distinction in XSLT programming style, and I've wanted a sort of all-in-one index of useful writing on the matter.

  • The discussion I most often refer people to is "2. Getting started with XSLT and XPath (cont'd)" by XSL tutor extraordinaire Ken Holman of Crane Softwrights Ltd.. It's part of his long article "What is XSLT?". In this article subsection he starts by discussing the difference between "explicit" and "implicit" stylesheets. The latter are what the XSLT 1.0 spec calls "literal result element as root", and it's such a rare pattern in my observation that you might want to just skip to section 2.2.6, which is the relevant part for push vs. pull.
  • Dave Pawson's XSLT FAQ has one of the earliest attempts to gather notes on the push/pull distinction
  • R. Alexander Milowski has a nice slide set, "How Not to Use XSLT". There are some other nice nuggest here besides illustration fo the push/pull distinction.
  • Hack #51 in XML Hacks is "Write Push and Pull Stylesheets", and is a decent discussion of the topic.
  • I reluctantly include "XML for Data: XSL style sheets: push or pull?", by Kevin Williams in this round-up. I personally am heavily biased towards push-style XSLT (as are most of my XSLT expert colleagues) and Kevin seems to be heavily biased towards pull. I think his reasoning about the readability of pull is quite shallow, and might make sense to readers when dealing with simplistic transforms, but not with ones of more typical size and complexity.

Way back in 2001 or so I wrote my reasons for preferring push over pull. Reviewing what I wrote I think it still covers my point of view:

Pull is a bad idea from the didactic POV. If one wants people to learn how to generate HTML and other simple documents as quickly as possible, there is no doubt that most people with any background in the more popular computer languages would catch on to pull more quickly than push.

But it's a false simplicity. Pull is easy when the problem space is simple, as is the case with so many toy examples necessary when teaching beginners. But programming difficulty scales at an alarming rate with the complexity of the problem space. It doesn't take long to run into real-world examples where pull is nearly impossible to program correctly.

Push on the other hand, while for some people more difficult at first, is a much more powerful approach for solving complex problems. And in almost all cases it is less prone to defect and easier to maintain.

This is not functional programming bigotry for its own sake. Since the invasion of webmasters and amateurs of scripting, it is easy to forget that document processing is one of the most delicate areas of inquiry in computer science, and it has called for elegant solutions from Knuth's TeX to Clark & co's DSSSL, to XSLT. As Paul Tchistopolskii explained here. XSLT at its best is about pipes and filters. XSLT's weakest points are where this model breaks down.

Whether your favorite conceptual module is pipes and filters, tuple spaces, or just good ol' lambdas, a fundamental understanding of push techniques is essential if you want to ever do any serious development in XSLT. New arrivals to this field take short-cuts only to get lost later. From a purely practical point of view, I think it's important to teach apply-templates, modes and friends well before for-each, and bitchin' value-of tricks.

If anyone wants to incorporate this stuff into Wikipedia, XSLT FAQ, or whatever, go right ahead: as with almost everything on Copia, it's CC attribution-sharealike (main task this weekend is to actually assert that properly in the templates).

[Uche Ogbuji]

via Copia

Africa and business on Talk of the Nation

Good show on Talk of the Nation Monday: "Seeking Good News in Africa". First of all, I want to say that ToTN is one of my favorite NPR/PRI shows (I also love The World and Marketplace, and Terry Gross is usually good on Fresh Air). Neil Conan is probably the most patient and likable call-in show host in my limited experience of talk radio.

The blurb for this program segment is:

The next G8 summit in July will focus on poverty in Africa along with war, famine and drought. But some are calling for a broader view of Africa, citing its many qualities that go beyond famine and tragedy. We discuss how to balance the bad news with the good from a continent in need.

It is nice to hear more than just the usual famine/jungle/war/safari image of sub-Saharan Africa in mainstream media (with nude children as the inexplicable universal extras). It was a good discussion, and I highly recommend it. Some of my own reaction...

"Jean" from the Cote d'Ivoire called in to advocate decentralization of power and local allocation of resources, which is precisely what we need, but he also admitted the down-side to this as over-simplified formula. Often encouragement of local policy leads to fractious forces that cause tension and can lead all the way to Civil war. Most African countries are unfortunate agglomerations of numerous rival ethnic groups, and a heavy-handed federalism can be the only way to ensure unity. On the other hand such centralization is a huge obstacle to developmental progress. Whoever can figure out a practical solution to this dilemma (besides the slow, assimilating force of time and demographics, which is what did the trick in old Europe) will have earned the Nobel Prize for peace as well as economics.

"James" from Ft. Lauderdale had an all-too-credible tale of attempting to do business in Nigeria, and being defrauded time and time again, and permanently swearing off any sort of commerce anywhere in the African continent (bit of an overreaction, perhaps, but can you really blame him?). This is the simple reality check. We have a long way to go (especially in Nigeria) in dealing with fraud and lawlessness. Right now there is no substitute for local (and wily) guidance if you want to do business in much of the continent.

The last caller was "Kehinde" (I think: he never himself said his name, so I had to go by Neil Conan's suspect pronunciation), also a Nigerian. He trotted out a line that's all too familiar: why are we, the huge African professional class in diaspora, just sitting here and complaining about the situation back home rather than going back, using our local knowledge to help grow business?

Sounds seductive, but I know I speak for many others when I point out that in 1980, I watched my parents go home on the wings of just such idealism. My Father was becoming an internationally recognized Materials Engineer at the time, and figured his calling was to raise more such high-quality Engineers in Nigerian Universities. Nigeria at that time was actually considered an emerging economic force, and the public order and standard of living back in '80 and '81 was very high. We could have been U.S. citizens, but my parents saw no reason to make such a move. There were no barriers to coming back to the U.S. anyway, and we were committed to a future in Nigeria. As experience grew with numerous political barriers, and as well-connected incompetents took over local and national affairs, my parents realized that there was no way to even make an honest difference without outside the oligarch network. I don't think they ever looked to get rich, but rather to live a decent middle-class existence, while making the sort of meager difference that brings about basic professional satisfaction.

They had more local knowledge than I ever will have (I did spent eight years in school in Nigeria), and I can't imagine that I would be able to accomplish more than they did. By the time my parents gave up (alongside numerous other highly talented professionals), and returned to the U.S. and Europe in the mid-to-late 80s the middle class was collapsing with the economy, and the desirable destination countries were already putting up barriers to immigration of Nigerian nationals, barriers through which we Ogbujis squeaked through (excepting my two brothers, who were born U.S. citizens). My father immediately got a job at NASA, where he could immediately feel that he was making a difference—just not in the way he as a native Nigerian would wish.

I do dearly want to find a way to make a difference back home, and I'm sure I shall in time, but I really resent being scolded glibly: "go back to Africa, you prodigal dispersed".

There was one subtle touch in the program that I just loved. They played a clip from the film Africa: Open for Business (Flash site). Sounds like an encouraging film, by the way:

The world does not see Africa as a business destination, but savvy investors know Africa offers the best return on direct investment in the world—yes, in the world.

In the ToTN clip you hear Adenike Ogunlesi, a fashion entrepreneur discuss her (happy) experience. She starts out with the gorgeous, British-inflected English that many of us had pounded into our head in school (and that I have largely lost to an American accent):

It was the first time that anyone had marketed children's clothes like that...actually using Nigerian children. The response...people actually wanting the "made in Nigeria" garments...

And then, at this point, she subtly switches to a bit of demotic Nigerian accent. Not the pidgin language, just the accent that goes with it. All of us in the hybrid Nigerian/foreign college-educated class adopt this affectation when expressing a quote from a supposed Nigerian man-on-the-street.

"Where is the label. I want the label outside. I want everyone to know I'm wearing 'Rough and Tumble'"

I wonder if non-Nigerians would even detect that she changed accent (I suspect that now that I point it out, they would). If you want to check, it's about 22m 30s into the program.

It's often the little things that make you homesick.

BTW, for a superlative source for information about practical commerce in sub-Saharan Africa, see Emeka Okafor's blog "Timbuktu Chronicles".

[Uche Ogbuji]

via Copia

Python community: XIST

XIST 2.10

XIST (simple, free license) is a very capable package for XML and HTML processing and generation. In the maintainers' words:

XIST is an extensible HTML/XML generator written in Python. XIST is also a DOM parser (built on top of SAX2) with a very simple and Pythonesque tree API. Every XML element type corresponds to a Python class, and these Python classes provide a conversion method to transform the XML tree (e.g. into HTML). XIST can be considered "object oriented XSL".

I covered it recently in "Writing and Reading XML with XIST". There are some API tweaks and bug fixes as well as some test suite infrastructure changes. The full, long list of changes is given in Walter Dörwald's announcement.

[Uche Ogbuji]

via Copia

Quotīdiē

Cause yo, I got the hairsplitting, self-written unbitten style
That leaves the competition running scared and shaking in their pants
You're best to set it off cause, black, it ain't no second chance
Once I'm open
All you doing is hoping
That the Live one
Will put the mic down, but son, don't try to snatch it after:
The laughter won't cease from the comparison;
How dare you, son,
Step around the booth when I'm on?
The microphone magician says "poof", you're gone With the wind. There's no trace of your friends
Cause you don't know where the beginning ends
Or where the end begins,
But you see that's the difference, you get sold, I get paid
Black I told you, get paid;
If you're broke I'll have to rain on your parade.
You belong in Special Ed if you think you Got It Made
J-Live with the mic is like the chef with the blade
Cause suckers get sliced and sautéed
Yeah, you thought your joint was fly but the flight was delayed

J-Live—from "Braggin' Writes"—The Best Part

As I demonstrate in Quotīdiē from time to time, contemporary Hip-Hop has some incredible wordsmiths (most of whom most people have never heard of, although it's good to see Common breaking into the mainstream). When you get to the cream of Hip-Hop lyricists, it becomes very hard to start working out who's really the best. How does one compare

And that's just rappers in English (Passi, en français, anyone?), and that's off-head, so I'm definitely forgetting some people. These folks are all clustered at the acme of lyrical skill. So where does J-Live fit in? I think it's enough to say that there isn't a better lyricist than J-Live, in any genre of music. His mastery of words is just amazing. A friend once marveled at how J-Live worked "amniocentesis" so effortlessly into "Braggin' Writes", but I maintain that it's not just J-Live's vocabulary that earns him the laurels (after all, he is an English teacher: he should command the language), but more importantly his effortless command of flow, Hip-Hop's prosody. (As the chorus of "Braggin' Writes" states: "everybody's rapping, and only few can flow".)

The "Braggin' Writes" quote above is ample example (and again you have to hear it to really appreciate it). Just to touch on one point, the line

You belong in Special Ed if you think you Got It Made

Works fine as direct (uncapitalized) statement, but is also a clever allusion to old school rapper Special Ed's song "I Got it Made".

I’m your idol, the highest title, numero uno
I’m not a Puerto Rican, but I’m speaking so that you know
And understand I got the gift of speech
And it’s a blessing, so listen to the lesson I preach
I talk sense condensed into the form of a poem
Full of knowledge from my toes to the top of my dome
I’m kinda young--but my tongue speaks maturity
I’m not a child, I don’t need nothing for security
I get paid when my record is played To put it short: I got it made.

—Special Ed—from "I Got It Made"—"Youngest in Charge"

 

Last night I went to the Fox Theater see "The Best Damn Rap Tour", headlined by J-Live (although it's mostly in support of Vast Aire's new albumThe Best Damn Rap Show). It was a long line-up of underground hip-hop stars. The kind of MCs and DJs who rule the ears of rap nerds like me, but who can't seem to get on first base in the unfriendly game of record label baseball.

Vast Aire is best known as front-man for underground sensation Cannibal Ox, and his counterpart Vordul Megilah was first up, spitting classic Can Ox in his trademark cadaver-focus style. Up next was C-Rayz Walz with tracks from his new joint Year of the Beast. I've heard of C-Rayz Walz, but had never listened to him. I definitely have to cop that album. And the man definitely has more energy than he knows what to do with: he stomped, stalked, swaggered and staggered all over the stage, often telling the DJ to cut the track so the crowd could hear his lunatic lyrics. Vast Aire was up after that, and again based on his set I'll have to cop his new album (The month's salary goes all to music, at this rate).

The crowd was a bit slow to get into the mood, which is unusual for Boulder. When J-Live came out to start his set, most folks in the front row had gone off to get drinks, or to hang with the earlier acts, who all got off stage to mingle. It only took the duration of the first song before it became a proper audience for J-Live, though. He did his amazing thing, rocking "MC", "Like this Anna", and "Satisfied?" to the jumping delight of the crowd (and me), there was an impromptu competition in the front row with folks trying to rap along to "One for the Griot". But the highlight of the night was when J-Live did something I've only ever seen him do (I saw him do this trick once before (with Chime and Davina) when he came to CU with Talib Kweli and others for a free concert). He rapped "Braggin' Writes" while dee-jaying the track at the same time (for the track he used Nas's "Thief's Theme", only the most banging beat of the new millennium), which hardly seems possible. And he didn't just prod occasionally at the wheels of steel: no, he was scratching and cutting almost throughout the song, without missing a beat in his rapping. Amazing!

I've already mentioned how down to earth all the acts were. J-Live was manning his own merchandise stand before the show, lounging in the same jeans, white tee and open red and white button-down flannel shirt in which he'd later perform. I asked him about "The Best Part", his first album, which never saw its way to stores because of record label troubles, and bought the last copy he'd brought along (duh! I should have had him autograph it). I considered asking him who his favorite poet was, but I didn't want to bug him before his performance.

One more quote to leave off with. This one Vast Aire's from an AllHipHop.com interview. He was asked whether he disliked that most of his fan base is white.

I don't even care about all that racism, it's all bulls..t. It’s a trick! It’s a demonic trick and it's disgusting. It separates people. Come on, remember Blondie? F..k Eminem, look at Blondie. F..k Vanilla Ice and Snow, look at Rick Rubin. When you wanna think about White people in Hip-Hop, think about the Beastie Boys. White people have already proven themselves in this. There should be way more White rappers, and way more woman in Hip-Hop today. But you have the powers that be. Hip-Hop is dominated by Nubian and Latino men. Where are the women at? All the women that are out now are damn near veterans, and that is sad. So I don't like any of that. I grew up in uptown New York. I grew up with a bunch of Latin and Nubian kids. Eventually, we got cool with two White kids, this kid Ralphie and his cousin, which was my first experience. And ever since that day, White people were more than Superman to me. At first, a White person is Superman, He-Man, a cop, or a bus driver. At first, you don't know a White kid. You have to meet and get cool with one, meet their family, and the next thing you know you have a friend. You are not looking at color then. And that is what happened to me. That kid was poor, that is the color we were. F..k all this racist bulls..t, we are the same color. So technically, we bonded because we were in the same class. It's class that truly brought us together. And I imagine the same thing happens to White people. A Black person has to be more than just Mike Tyson or Michael Jackson. You have to meet them, and invest time in them.

Co-sign (bowdlerization by AllHipHop.com, not me). Interesting to mention that in my list of top lyricists above there is one white guy (EL-P) and two women (Apani B. Fly and Jean Grae). Two other women (Bahamadia and Rah Diggah) are near misses. I don't go as far as to say "fuck Eminem": he's very talented, but he's just not in the same class as the folks I mentioned. It's a very tall barrier to be a top Hip-Hop lyricist.

[Uche Ogbuji]

via Copia

Dreaming of a useful HDTV PVR

I want an HDTV PVR as unencumbered as possible. Ideally, it would sit by the TV/cable box and communicate closely with my Linux computer. Failing that, it could be a card in my Linux computer, and I'd just have to snake a cable from the living room to the computer room. Unfortunately, this is a much more complex matter than I would have thought.

The set-back to the broadcast flag leads me to think I have more time to buy/build the right device, especially since it's unlikely to be reversed this year, but I still don't see any coming solution to the basic technical problems.

The main resource I've checked out is the EFF's HDTV-PVR Cookbook. It makes it clear that the only real option for me is limited to "terrestrial broadcast (free over-the-air) digital television using an antenna." Cable apparently uses encryption. Problem is that almost everything I'm interested in watching in HD is on a cable channel.

I suppose the fact that Tivo seems to be increasingly terrorized by big media and scorned by cable and satellite outfits renders unlikely our ever seeing an HD Tivo that allows capture to a Linux box.

[Uche Ogbuji]

via Copia

First lady megrims

Nancy Reagan's megrim was drugs, especially child drug use.

Hillary Clinton's obsession was everything (well, hey, that's why she went into office for dolo: so she could wrap up the bits of everything she'd left unaddressed as Dame the First).

Laura Bush's are the vagaries of peril that confront American boys (WTF?). I guess there's also using her intelligence as distraction from her husband's nescience.

What was Barabara Bush's? I can't think of anything.

[Uche Ogbuji]

via Copia

Quotīdiē

The only map is the map of the bear.
Your best hope is to follow it closely,
Closer than dogs. It's engraved with your spoor,
You wake in the night to find it partly
Charred by the dying fire. The only

Map is the map of the bear. Follow
It closer than dogs. Your best hope is
To read the part engraved below
The surface of the fire. Sleepless,
You move by night. The only map is

The map of the bear. Dogs know,
That's why they follow with no hope
The dying spoor. You're passing through
Fire, you've passed through sleep,
Now the only map is the map

Of the bear. Now hope gives up
Its secrets, now you follow where
Dogs won't go, even in sleep.
Above, the route's engraved on fire.
The only map is the map of the bear.

Tad Richards"The Map of the Bear"

Peter Saint-Andre mentioned the New Poetry discussion list, which he learned about in an earlier Quotīdiē. I'd been living in a bit of a shell regarding contemporary poetry before I joined that list. (Upon arriving in the U.S. in 1989 I looked around, aghast at mainstream verse, and retreated quickly to past classics). The list has been a good way to bring energy back to my study of poetry, and to keep in touch with contemporary work. It turns out that there are some very good poets on that list, though I didn't recognize them by name, because of my ignorance of the contemporary scene. I do recognize the quality of their work, and today's Quotīdiē is a piece by a regular on the list, Tad Richards. In addition to being posted on the list, it was also hosted on The Poets' Corner by Anny Ballardini, another regular. The list is a very rich find. I'll later post links to other good poems posted to the list.

Refrain-like verse forms are very popular in modern poetry, from Villanelle to Pantoum and so on. (I somtimes call these poetic fugues). It seems that in the past couple of decades poets have become especially skilled with the use of partial refrains. "The Map of the Bear" teases out a sense of desultory restlessness with its partial refrains. The meter is accentual, with four accents per line. This is a very versatile framework, but I've always found it easiest to hear gothic tones in it, and in this poem, that feeling is particularly apt. Another poem that struck me immediately because of its partial refrains is Dana Gioia's "The Country Wife".

She makes her way through the dark trees
Down to the lake to be alone.
Following their voices on the breeze,
She makes her way. Through the dark trees
The distant stars are all she sees.
They cannot light the way she's gone.
She makes her way through the dark trees
Down to the lake to be alone.

Dana Gioia—from "The Country Wife"

Peter later followed up on my observations on how poetry slows down perceptions, leading to richer understanding and appreciation.

The other day, Uche argued for the continued relevance -- indeed, the increased importance -- of poetry in today's fast-paced times, since the concentrated and often difficult nature of poetic language forces the reader to slow down. Yet (as Uche knows) it is more than just diction: it is also the meter (or, more broadly, the rhythm) that induces a kind of slow time when one reads a poem. Poetry is a temporal art in much the same way music is -- and in one respect, a poem enforces slow time even more viscerally than a piece of music does because usually you perform the poem (by reading it silently or aloud to yourself) rather than having it performed for you at a poetry reading or by means of a recording. The post-modernists would call this co-creating the work, and for once they would be right!

Peter is right that rhythm is the primary tool for the slowing and enriching effects of poetry. I also agree that meter is the most established form of rhythm, and that it's harder for non-metrical rhythm to bring this richness. Peter is also right to reiterate that Poetry is a mere shadow without its performance (whether it's the reader sounding out the poem in his head, or in public performance). With all that in mind, I quite consider "The Map of the Bear" an example of how a poem can work such slow enrichment outside classical framework. Accentual meter is quite respectably meter for me, and the partial refrain, especially when read aloud, serves to deepen the incantatory mood. "The Country Wife" is also accentual. There is much more of an iambic tetrameter basis, as one would expect from a formalist such as Gioia, but it is still variant enough to be more accentual than accentual- syllabic, and I think this suits that poem well. Interesting, this juxtaposition of accentual meter and partial refrain—It makes me think of fugue, a baroque musical form, not just because of the echoing phrases (to go with the echoing melodies in fugue), but also because of the overstatement (in a positive sense) suggested by the four-stress line. It is an approach I shall have to explore more fully in my own verse.

A final note of interest is that "The Map of the Bear" originated from a misreading of a trite phrase. In Richards' own words:

I do have a poem based on a misread statement that was sorta interesting. Reading an article about a performance artist, I came across the statement that she explored a territory where the only map is the map of the bear.

I thought this was one of the most fascinating ideas I'd ever read. Then I looked again and saw that it actually said she explored a territory where the only map is the map of the heart. This was a territory, I realized, which held no interest whatever for me. But what about that territory where the only map is the map of the bear? I wanted to know more about that...a territory where the wilderness mapped itself. I had been deeply moved by Kurosawa's great movie, Dersu Uzala, where mapmaking becomes a symbol for both exploration and limitation, and I started to feel that I had to know more about the territory mapped only by the bear. This was the poem that came of it.

[Uche Ogbuji]

via Copia