Wednesday, June 06, 2007

So hmm, Dark Phoenix. A girrrl?

Your results:
You are Dark Phoenix


































Dark Phoenix
60%
Mystique
58%
Apocalypse
57%
Magneto
56%
Dr. Doom
47%
Green Goblin
46%
Catwoman
46%
Juggernaut
46%
The Joker
45%
Riddler
44%
Venom
41%
Poison Ivy
39%
Mr. Freeze
37%
Two-Face
34%
Lex Luthor
31%
Kingpin
20%
A prime example of emotional extremes: Passion and fury incarnate.


Click here to take the "Which Super Villain am I?" quiz...

Friday, March 30, 2007

More on Gtk2Hs on Mac Os X

It turns out that the problem with Gtk2Hs was not related at all to GMP or OS X frameworks. The issue is related to ticket #957 and libraries not in the default search path. The problem is fixed by passing the flags '-L/opt/local/lib -I/opt/local/include' to ghc when compiling a Haskell module that uses Gtk2Hs. The right thing to do, copied from the MacPorts book, is to edit your ghc driver (mine lives at /usr/local/bin/ghc) and add these flags there:

Contents of my /usr/local/bin/ghc file:
GHCBIN="/usr/local/lib/ghc-6.7.20070328/ghc-6.7.20070328";
TOPDIROPT="-B/usr/local/lib/ghc-6.7.20070328";
# Mini-driver for GHC
exec $GHCBIN $TOPDIROPT ${1+"$@"} -L/opt/local/lib -I/opt/local/include

Friday, March 09, 2007

If I had time

Projects I would work on if I had a bit more time.
  • An improved way to handle exceptions for Haskell I have half-thought. More on this soon
  • review hs-plugins and get it to work on the Mac
  • A Dashboard widget for the awesome Lambdabot
  • Read all those papers I want to read (sic)
  • Finally get the mutable engine in the Omega Gameboy emulator to work, after all the time I have invested already (should put a Darcs repo up). Then the fun begins: profile and optimize extensively
  • Blog more
  • Get a website for myself
  • Definitely... read GTD and start getting things off this list
Projects I will work on as soon as I get the time.
  • The ghc 6.7 branch of Shim: Integrating the debugger. I have already some code but I'm waiting for soon-to-come changes in the debugging primitives in the ghc-api
  • Send patches for the GHCi debugger... bugfixes, new bugs, new commands, experiments, etc.

Wednesday, March 07, 2007

Gtk2Hs on Mac Os

Omegagb-0005

It all started with the Omega Gameboy Emulator written in Haskell. I got interested by the optimization challenge, it's a cool project after all, even though Haskell is not the most appropriate choice of a language. As a matter of fact I've never been a low-level guy, a systems programmer, but this project had its allure. After having played with the Universal Machine VM this summer during the ICFP contest, I found that I could understand the code very quickly.

After a few days hacking on Omega (it turns out that of the two alternative implementations of the CPU, the fast one was half-coded only, so I wasted a lot of time trying to debug it until I found this out), I got the unstoppable desire of seeing the emulator in action. I had been trying to avoid this, because I knew that setting up Gtk2hs on my Mac Os X86 would be a nightmare, but I just couldn't let go.

So here go my findings. These apply to the current release of Gtk2Hs, that is 0.9.11. I installed gtk2 via MacPorts, and hand compiled Gtk2Hs.

First, home compiled versions of GHC won't work. Gtk2Hs itself will make and install fine, but the helloworld demo will die with a "bus error". GDB is pretty useless to debug the problem. But someone in #haskell told me that MacPorts GHC would work, though he didn't know why. I tested this and he was right. So I digged into the MacPort install script for GHC, and it seemingly has to do with treating GMP as a lib instead of as a framework.
So this is what I found. GHC has a section in the configure.ac file to look for a GMP framework and use that. MacPorts installs GMP as a lib, and since all MacPorts ports try and succeed in eating their own food, the GHC port includes a patch to teach the configure script to use their GMP lib, and ignore any framework.

I don't really understand how frameworks are supposed to work in Mac Os, so I don't know if this makes any sense at all, but now my home compiled GHC is able to compile Gtk2Hs and Haskell code using Gtk, and everything works. I guess it should be possible to manually apply the patch at the ghc port, but I haven't tested it; I did my changes by hand to my package.conf file.

UPDATE: The real fix is given in a later post

Thursday, October 19, 2006

www.songmeanings.net

What is better than procrastinating and listening to music at the same time? You got it: procrastinating about music.

This is a short entry to comment on said site. I just stomped on it, surprisingly via google. Yes, I didn't use any of the flashy diggit-readit-web-2.0-cool-sites-that-talk-about-sites-or-blogs... So, I have spent the whole evening procrastinating around its contents. And how we love these things... There is another thing we people love (apart from Of Montreal's Hissing Fauna album of course), and that is silly statistics, the sillier the merrier. Or look at Last.fm success (disclaimer: I love this sort of things too)

Before finding it I didn't know how addicted I was to song commenting!
After all it makes a lot of sense; people comment on albums, movies, shows, and personal posts such as this one! (sadly this blog is mostly comment-less, so it is not a good example).

So thanks to my newfound addiction, I've spent all this time digging each and every comment on every song of my latest fetish album: Hissing Fauna by Of Montreal. It is an impressive album. It is always impressive when a band produces its masterpiece, but it is jawdropping when this masterpiece comes as what makes their 10th studio album. How not to love songmeanings.net when you find comments as reassuring as:
"Hissing Fauna, Are You the Destroyer?" is final, clinching proof that Kevin Barnes is totally crazy. And totally awesome.
(on Faberge Falls For Shuggie)
Other funny comments that you can find on the songs in Hissing Fauna:
Favorite song. It's ridonkulous.
(on Heimdalsgate Like a Promethean Curse)

By the way, it is definetely about drugs.
(on Heimdalsgate Like a Promethean Curse)

My mom flat out asked me what the hell this song was about, and I simply told her
"Someone who is having a chemical imbalance and wants to be in a good mood, this their chemical imbalance shifting."
It's kind of funny I should be able to sum it up in a few lines. It's such a deep song.
(on Heimdalsgate Like a Promethean Curse)

"the mousey girl screams violence, violence
the mousey girl screams violence
she gets hysterical
'cause they're both so mean
and it's my favorite scene
oh, the cruelty so predictable
makes you sad on the stage"

Reference to Edward Albee's play Who's Afriad of Virginia Woolf. Honey, the mousey character, does scream "Violence! Violence!" at a point in the play when George and Martha are at each others throats.
(on The Past Is A Grotesque Animal)
The last one is too clever for me, but I mean, I looove this kind of stuff. When I'm not punishing my brain with Haskell, I'm either procrastinating or listening to music. And lately often procrastinating about music.

Tuesday, October 17, 2006

Just received my Summer of Code T-shirt



Now I can brag around my Uni with it!

Saturday, October 14, 2006

I have a lot of work...


..and I'm pissed!