History Repeating Itself: wxUniversal

I work with a cross-platform toolkit called wxWidgets. The idea is that the wxWidgets classes are all wrappers around real platform-native widgets, so that you can program with a “wxButton” and it is implemented on Mac as a Carbon button, on Windows as a Windows button, on Linux as a GTK button, and so on. (No Cocoa buttons for Mac! Cocoa’s GUI architecture is too deviant from the norm for the wxCocoa project to have gotten very far.)

I mentioned this to my friend Eric, a Java dude, a year or so ago, and he said, “oh, just like the old awt!” I was a bit taken aback, because the Java awt (abstract windowing toolkit) was a notorious failure. Awt-based applications were ugly and tended not to work right on platforms other than the one they were mainly developed on without major bug-squashing effort.

Kind of like wxWidgets applications….

I put it out of my mind until, googling for information on making universal binaries for wxMac applications, I came across wxUniversal.

The wxUniversal port is a SciTech Software-sponsored project to create a set of widgets that are implemented in wxWidgets itself. In all previous ports, with some exceptions, each widget class is a wrapper around an existing implementation on that platform. A wxUniversal-based port therefore needs only need a relatively straightforward effort on each new platform, to provide basic classes such as wxWindow, wxFrame and wxDC.

Wow, that’s… that’s exactly what Java ended up doing with Swing. They implemented widgets themselves, so they only had to port some basic drawing and event primitives from platform to platform, and they weren’t burned by differences in architecture between various platform-specific widget sets. Then Swing implemented “pluggable look and feel” to allow it to adapt to the look and feel of the various target platforms, so it could blend in without actually using the native toolkits…

wxUniversal supports a theme system to change the look and feel, and there are currently two themes: WIN32 and GTK+.

DOH! History repeats itself again. And I’m a decade late.

Rmagick

To write a rails app that manipulates images (e.g. makes thumbnails), you need the extension rmagick. Rmagick is hard to install, as its web page notes:

RMagick can be more difficult to install than the typical Ruby extension. First you have to install ImageMagick or GraphicsMagick, and those libraries require a lot of other libraries.

I wanted to install it on my Mac without depending on Fink or MacPorts so it wouldn’t be vulnerable to my wiping out Fink or MacPorts in a fit of anger and resentment.

In retrospect, I could have installed it without immense pain by consulting the aforementioned web page. Also, I ran into trouble compiling libwmf, which was related to the ‘gd‘ graphics library, so I decided to try installing gd on its own first; it turns out gd has a great document about solving problems that arise compiling on OS X, and many of the tricks there help with other prerequisites.

Finally I had to make my own little fix by going to /usr/local/share/ghostscript and doing the following:

sudo ln -s 8.56/fonts ./
sudo ln -s 8.56/lib ./
sudo ln -s 8.56/Resource ./

because rmagick was looking for fonts in /usr/local/share/ghostscript, not /usr/local/share/ghostscript/8.56. (The lib and resource links may not have been necessary but I did them to be thorough.)

After only a half dozen lengthy false starts and staying up till 1 AM messing with it, I had me a working copy of Rmagick! Huzzah for libraries that depend on libraries that depend on libraries that depend on libraries, where a problem compiling any one of them can hose you completely!

Vimeo / Lip Dub – Flagpole Sitta by Harvey Danger

Vimeo / Lip Dub – Flagpole Sitta by Harvey Danger:

Despite the fact that it contains enough young, hip, attractive, happy, dancing people to make me puke, this video is fun and clever. Worth a watch. Via pop culture will eat itself, which reports that the people in the video are the staff of some successful internet humor and t-shirt company, which means this is what their work day is like, which is even more hateful.

On second thought, fuck them. Don’t watch the video. Just click here and be surly with me.

West Michigan Think Tank Creates Poster Boy For Abandoning Aid to Africa

Preaching Free-Market Gospel to Skeptical Africa – New York Times:

Lawrence W. Reed’s unusual line of work, coaching conservative policy groups, has left Mr. Reed, a Michigan economist, with acolytes across the globe. But none please him more than James Shikwati, whose unlikely rise offers a case study of how the right grooms foreign allies.

Interesting. Mr. Shikwati is usually quoted as a native African who’s come to the conclusion that foreign aid is bad for Africa. (An interview in Der Spiegel is a showcase of this idea.) What’s not as often mentioned is that he did not come to this conclusion out of the blue, simply as a natural consequence of observing the effects of aid in Africa. He had a “born-again” conversion to Libertarianism, and established ties to a conservative think-tank here in West Michigan. Only then did it become obvious to him that the worst thing that the developed world had ever done to Africa was tried to feed starving people there.

Mr. Shikwati’s conversion to capitalism started with a rejection letter. As a 27-year-old teacher in a rural high school, he applied to dozens of American graduate schools and gained admittance to none. But one rejection came with a book, “The Law” by Frédéric Bastiat.

A 19th-century, French, pamphlet-length attack on the state, “The Law” enjoys something close to a cult following among some libertarians. It describes taxes and regulation as “legal plunder,” and sees tyranny at work in laws that force citizens to support public schools. “Try liberty,” it demands.

“ ‘The Law’ just spun me around,” said Mr. Shikwati, who flirted with socialism at the University of Nairobi and made the book’s translation into Swahili one of his group’s first projects. “It showed me I was believing in the wrong things.”

Mr. Shikwati wrote to the book’s nonprofit publisher and received a journal with a column by Mr. Reed. Many busy people would have ignored the letter that soon landed on Mr. Reed’s desk. (“Exactly what does the Mackinac Center for Public Policy do for the citizenship of the world?” Mr. Shikwati asked, referring to Mr. Reed’s group.)

But Mr. Reed, 53, runs a conservative “think-tank school” that twice a year draws allies from across the globe. In answering, he began a four-year correspondence. “This is how the movement grows,” he said.

By 2001, with Mr. Reed’s help, Mr. Shikwati landed two grants totaling about $9,500 a year, one from Atlas and one from a related British group, the International Policy Network. IREN now has a budget of $300,000 and seven full-time employees.

With no academic credentials, Mr. Shikwati made a mark as an author of opinion articles. He defended McDonald’s against critics of globalization and drug companies against charges of price gouging. He called for the legalization of the ivory trade, which he argues would protect elephant herds. Above all, he called for an end to foreign aid, saying it hurt local markets, corrupted governments and promoted dependency.

His iconoclasm and his authenticity as an African made Mr. Shikwati attractive to the Western press, despite his lack of prominence at home. His views quickly traveled the globe, appearing in places as diverse as The Sydney Morning Herald, The Jerusalem Post, The Times of London, Forbes and The Washington Post.

Echoing his calls to end foreign aid, Suzanne Fields of The Washington Times lauded Mr. Shikwati, who has a bachelor’s degree in education and no economics training, as nothing less than “a distinguished Kenyan economist.”

Critics see a sleight of hand, in which Western conservatives created a faux expert, then cite him to justify their views.

“The truly hard-hearted have been looking for a developing country ‘economist’ to sing this song for years,” said Neil Gallagher, a spokesman for the United Nations World Food Program in Rome, which feeds about three million Kenyans a year. “It justifies their meanness.”

Mr. Sachs of Columbia University said Mr. Shikwati was “part of a game” the conservative movement played to create an impression that Africans oppose foreign help. Although he agrees that some aid programs have failed, he said others had eradicated smallpox, slashed polio rates and started Asia’s green revolution, saving hundreds of millions of people from famine.

Even Mr. Shikwati’s African admirers tend to distance themselves from his absolutism. Maggie Kamau-Biruri, who runs the Kenya office of the International Child Resource Institute, a nonprofit group, finds it hard to talk of less government in a country without enough paved roads and no public high schools. But “I really like him a lot,” she said. “He means well and wants to see his country move forward.”

mc chris: just fileshare it, i’m tired of selling my music

blog.myspace.com/mcchris:

GET IT WHILE ITS HOT (music going offline!)

all back catalog cd’s have been stricken from the shelves at indie merch store. dungeon master of cermonies and eating’s not cheating will be available on itunes for one more month, after that i will have cd’s with me on the road, but after that…

WE ARE NOT PRESSING ANY MORE.

we may bring it back but not any time soon. there are just a few hundred left so i’d say come to a show and get one of the last of its kind. thanks to indie merch for kindly shipping all those cd’s and thanks to mudhut.co.uk for hosting us on itunes. we got to lots of kids thanks to ur team’s efforts and i appreciate it for real.

as for the why… it’s just a new time in my life and i think i’d be happier if i knew u guys were just sharing it. i think sharing it is how i got to have any success in the first place. so its nice to just let it all be free. we wont be hosting any discs except for life’s a bitch. ur just gonna have to pass it along urself. regardless of what anyone else may say, i really hope u do. i need help getting the word out and i look at the back catalog like they’re dandelion spores.

peace and thanks to everyone that ever bought these discs. :)

wow. You don’t see that very often.