fivemack: (Default)
Tom Womack ([personal profile] fivemack) wrote2005-03-24 12:58 pm

Among the odder things to do on Maundy Thursday

is to write a Haskell program to enumerate polyominos. There are 369 such consisting of eight tiles.

To my slight disappointment, even when compiled with ghc, it is about 12% slower than the Python equivalent. And the Python draws the tiles out to a .PNG file, whilst I've no idea how to get the Haskell to do that.

This is the software equivalent of a CRIT request: could I ask Haskellian or Pythonesque readers to have a look at the code and point out where I'm committing staggering solecisms of style and speed?

OK, probably many of them will be at Eastercon as they read this, as will I be tomorrow.

[identity profile] sphyg.livejournal.com 2005-03-24 02:32 pm (UTC)(link)
Imagine what the Monty Python equivalent would be like. I'm not going to Eastercon as I can't afford it.

[identity profile] hsenag.livejournal.com 2005-03-24 03:06 pm (UTC)(link)
http://urchin.earth.li/~ganesh/temp/polyomino.hs
is an attempt at improvement, mostly in style.