Evan Martin (evan) wrote in evan_tech,
Evan Martin


Earlier I was working on a XUL-based Diplomacy viewer, but I decided I wasn't learning anything (aside from that XUL is not quite there yet and programming in JavaScript is frustrating), so I switched to Haskell's Cairo bindings.

I still have a bit of JS in the demo viewer (you can drag the map, and click forward to page 2), but it's much simpler so I'm less likely to get it wrong. After changing my mind a few times, I settled on showing the map as two layers: the background is the same for every view, and then each turn's worth of moves is a layer on top. This is way slower in the browser than one single image, but a single image per turn is 500kb per image and this way each turn is just 40kb more data.

Today I played around a bit with the rendering. It still doesn't show convoys, and I'd really like to use curved arrows to represent supports, but I haven't quite figured out the best way to visualize everything.

This project may be my first where I'm attempting to use Haskell to solve a "real" problem, so I've been learning a lot about practical strengths and weaknesses. But I also haven't been able to devote much time to this or other personal projects, as I've been pretty busy lately with Real Life and work.
Tags: haskell, project

  • blog moved

    As described elsewhere, I've quit LiveJournal. If you're interested in my continuing posts, you should look at one of these (each contains feed…

  • dremel

    They published a paper on Dremel, my favorite previously-unpublished tool from the Google toolchest. Greg Linden discusses it: "[...] it is capable…

  • treemaps

    I finally wrote up my recent adventures in treemapping, complete with nifty clickable visualizations.

  • Post a new comment


    default userpic
    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.
  • 1 comment