Sunday, November 30, 2008

talk.politics.fax-machines.nude

It says a lot about the current insane state of American religious paranoia that the Snopes.com urban legends site has a whole category tagged 'Politics -> Christmas'.

The issue, in case you haven't noticed, is the rather odd idea that Christians, in America of all places, are being marginalised. Because, you know, some companies aren't saying 'Christmas' enough. This is important; if your religion doesn't have the unfailing backing of free market capitalism, it will wither and die.

So, remember, anyone who doesn't say 'Christmas' enough during December should be stoned. It's the Christian way!

(Title is a vague reference to silly newsgroup names of old)

Friday, November 28, 2008

The Language of Web 1.0

On the Apple acquisition of Next, by which they obtained what became MacOS X and reclaimed Jobs:

Apple hopes that Next's object-oriented, Java-enabled open development platform will significantly improve its Internet and intranet position because its technology is agile.

Well, indeed. Agile! Internet! Java! Objects! Let me tell you, these were the AJAX, user-generated content and social networking of their day.

Interestingly, at the time of the acquisition, the main appeal of Next was seen to be WebObjects, the now-rather-obscure Objective-C/Java web application platform. iTunes Store uses it, but I doubt much else does. Of course, the real gems were NeXTStep (on which the abandoned Rhapsody project and ultimately MacOS X were based) and Jobs himself, who became CEO again in short order.

(Via CNET)

Thursday, November 27, 2008

Fun with CFFI and wxWindows/wxWidgets

I've mentioned before that there isn't really a sensible way to write a multi-platform GUI app with a free Common Lisp implementation. There are GTK bindings, but there is no proper GTK for MacOS. There are very good Cocoa bindings in Clozure CL, but Cocoa is MacOS only. There's a tk-based library, but, well, you've seen tk, right? There's a QT library, but QT is dual commercial/GPL, and therefore unsuitable for most software that most people might want to write. And the list goes on.

So, I decided to have a shot at doing something about it. Now, it turns out that there is a binding for wxWidgets (previously wxWindows; changed after some words with Microsoft). And wxWindows works, and looks, relatively nice, on Windows (using Win32), MacOS (using Carbon), and various Unixy things (using GTK or a direct X11 interface). Sounds perfect, right?

The catch is that it hasn't been touched in years, and supports only an old version of wxWidgets, with no Unicode. The version that it supports is, in fact, too old to run on MacOS Leopard. However, it gave me the idea to look into doing my own.

The reason that it only works on old versions of wxWidgets is that it uses an old, unmaintained fork of wxc, a C interface to wxWidgets; wxWidgets itself is in C++, and foreign function interfaces to C++ things are notoriously tricky. There are various other users of forks of wxc, and the most active seems to be wxHaskell ; their fork (the version in their DARCS repository, not the release) actually works with the latest wxWidgets.

So, I took and compiled that against the version of wxWidgets which comes with Leopard. And some messing around and much cursing and swearing later, well, I've got enough of a Lisp interface to produce this:



(The Japanese is from Google.jp, and is there purely to demonstrate that it can handle Unicode.)

Biggest problem thus far was the text; I had vaguely expected it to accept ASCII cstrs, but in fact the Unicode build of wxWidgets uses null-terminated w_char arrays, which are 4 byte (UTF-32) on MacOS. This turns out to be easy to deal with; you can either change cffi:*default-foreign-encoding* or do it on a per string basis with allocate-foreign-string. Initially tricky to debug, though, as it's my first time working with passing UTF-32 to C things.

This should, by the way, work fine on all supported platforms (with UTF-16 instead of UTF-32 on Windows); I haven't had a chance to test this yet, though.

I do plan to continue working on this and eventually produce a usable library; it's quite a way from that at the moment, and only provides minimal functionality. I like it, though; it opens the possibility of making distributable, native-interface apps on all of the major platforms in Common Lisp, which is nice.

Oh, by the way, distributable? That app above works out to 9MB compressed when compiled with SBCL, if you include the wxc library. A little hefty, perhaps, but it shouldn't grow too much in size with some actual functionality; it's largely SBCL overhead...

I do, by the way, have an application in mind to use this for. Tell you later. :)

Wednesday, November 26, 2008

QUOTES! From the INTERNET!

From Youtube:

NTSC. NTSC is the same thing as USA.
I have not the words.

Suspension of Disbelief

And now, Solution of Apostasy!

You're welcome.

Sunday, November 16, 2008

On Gay Marriage

What the 'christian' wackos are really afraid of.

Note the sandworm.

ESR at it again

Noted 'libertarian' (code-word for mad person) open-source gun nut Eric S Raymond is at it again.

I mean, really! Barak Obama, 'hard-left'? About as hard-left as Mary Harney.

Sometimes, I wish Raymond would go back to fetchmail and stop ranting insanely all over the place.

Saturday, November 15, 2008

It's the end of the world as we know it...

Is it just me, or is this the least reassuring thing about the economy ever seen?


I mean, things are so bad that even America's retarded president is looking a bit worried. Argh.

Forgetting Maths

I suspect that this is a common phenomenon. I used to be good at maths, damnit. I've just realised I can't remember any of it, after a couple of years of being out of college.

Someone should publish a book for people who had a maths-oriented education and then replaced all that information with crap about databases over a couple of years. A sort of catch-up. I want to be able to deal with things like moments and integration and so forth again!

The trouble with being a single gay

I just saw an ad for a gay speed-dating night in one of Dublin's gay bars, on Facebook.

First thought: Good ad-targeting.

Second thought: That's absurd.

Third thought: Though realistically, maybe I should go along.

Fourth thought: I'm probably too shy and nervous to even be able to go to an event designed for losers without seeming insane.


Fifth thought: Maybe all the other people would be as well. That would be okay.


Hmm, must stop having arguments with self about embarassing social events.

Though, I may actually end up going.

Sunday, November 9, 2008

So, why Moose Lady?

McCain did something very silly in the election, something which destroyed any chances he might have had left. Vice-president Palin! So, why her, of all people?

Well, they had a problem. A section of Obama's support base voted for him not particularly because they believed in his policies, or even understood them (that many people took McCain's 'socialist' charge seriously shows that a significant section of the American population really has no idea about what is involved in running a country at all), but rather because they wanted to be part of a historic election, the first election in which a black person was elected.

Of course, McCain couldn't nominate a black person himself; a large part of the Republican support base is made up of racist dolts. One need only look at what happened to Democratic support in the southern states after the end of America's apartheid. Nor a Jew, because, well, there are a surprising number of those crazies who go on about Jewish conspiracies out there, and they almost all vote Republican. Romney might have been an option except that, well, he didn't feel different. He went out of his way to downplay the Mormon thing throughout his campaign.

McCain, as well, did not appeal to the Jesus-freak segment, who are also big Republican voters.

So, there were two constraints; the VP candidate had to be a woman, all minorities being deemed unacceptable, and she had to be a wacky religious person. But there was really a third constraint. A lot of Republicans, even female Republicans, are very, very paranoid about 'feminists'. Quite what they think feminists are is unclear; certainly nothing to do with the normal definition. But they don't like them, and thus a competent, successful woman would seem a threat. Some were considered at one point, apparently both the EBay CEO and Carly, the Killer of Alphas, were considered. But ultimately, they could have frightened some of the voters.

So, instead, they got the dim, crazy governor of Alaska. On paper, she seemed okay. Weird religious views and affiliation with a scary anti-Semitic group, total bemusement about the world around her, and a history of massive abuse of power for personal ends. There was, however, a hitch. McCain's campaign had special circumstances; while normally the VP isn't that important, and there is only a vague chance of them becoming president, in this case, it was practically certain that McCain would die, if not in his first term then in his second. I don't think anyone, not even the dumbest, most bigoted, fag hating cross burning bible thumper, could quite imagine President Palin. The image was just too disturbing. Meeting with leaders of countries she'd never heard of, dictating finance, when, let's face it, she probably doesn't know what complex interest is, behaving in the interest of her country when she couldn't even put the interests of her state over her personal neuroses... It couldn't have worked.

And that, to a large extent, is why McCain failed. He was caught in an impossible position; there was really nothing he could have done to make it right. Thankfully. Imagine four or eight years more of the Republicans. Not that I'm convinced Obama will be all that much better, but he could hardly be worse.

Poor blog...

Sorry I have so dreadfully neglected my little blog for the last month or so. I've been terribly, terribly busy, and not in a great mood generally. Things should improve a bit from now on, though, and I may, even, eventually get back to my post-a-day habit. I haven't forgotten you, really!

Wednesday, November 5, 2008

Obama looks like winning!

Yay!

...

I wonder will he actually be any good? I just like him because he seems vaguely reasonable and is not either a war-crazed geriatric or a wacky moose-lady.

Also, how will they dislodge Cheney? Is there a special spray you can get?

Symbol Surplus

Does your monitor have enough random certification authority marks on the back?! Well, does it?


Please note that the offending monitor contains mercury, hourglasses, and the European Economic Community.

Saturday, November 1, 2008

Bitch!

I was out for a drink after work last night with a few programmer-y types. It was, of course, Halloween, and about half the people in the bar were in costume.

So, a girl comes up to me, and says "Harry Potter, right?" No, this is just the way I look naturally...

I'm not quite sure if it was just an unkind joke at my appearance or if she really thought I had dressed up as Harry Potter.