Visualizing 2D convex hull using Gtk and OpenGL in Haskell

This note shows how to use OpenGL with Gtk in Haskell. The result is a little visualization to check our implementation of the classic iterative convex hull algorithm.

hull1.png

This post is a valid literate Haskell file so save it to something like ConvexHull.lhs and compile with ghc --make ConvexHull. What you see above is what you’ll get when you run ./ConvexHull (more…)

Slideshow presentations in LaTeX

There’s a really nice presentation package for LaTeX called powerdot; I moved to it directly from Prosper – I never got around to using Beamer or HA-Prosper – and it rules. (more…)

Installing Gentoo on a Dell Latitude D410: USB CDROM bug

I’ve got a borrowed laptop from my advisor that I need to install Gentoo on. But I have no working CD burners in the house, and only oldish Gentoo CDs, which have bugs in that they don’t properly initialize and wait for the USB DVD drive (the only removable media this laptop has). This is fixed since mid-2005 but as I said I’m scrounging for CDS. Luckily many quick fixes are floating out there: (more…)

LaTeX editing tools

Editing LaTeX is very nice with WhizzyTeX but I seem to frequently get version/program conflicts where one or more of emacs/whizzytex/advi are unhappy. So I came across a variety of emacs helpers for writing TeX with a little less pain; I have yet to try them out so this list is as much for me as anyone else:

  • WhizzyTeX – realtime preview of TeX in a separate window. This synergizes the idea of GUI word processing (the important part of WYSIWYG is realtime visualization) and markup languages (which beat all GUI’s hands-down in terms of ease of editing complex documents).
  • preview-latex – has an “edit” mode where you hack latex, then when you leave edit mode it renders a little preview. I haven’t tried it in depth yet.
  • AucTex – A nice LaTeX major mode (or so I hear)

Presenting semi-formal proofs in LaTeX

I’ve done some reading about presenting somewhat formal proofs (a bit shy of those that can be machine checked), and wanted LaTeX packages that could help me with it. In particular, tedious programming language proofs by near-trivial induction over syntactic structures. I didn’t find anything great, but I did find some packages. (more…)

Lilo: “L 99 99 99 99 99 99 99 99″

I compiled a 2.6.16.2 kernel a while ago, and finally got around to rebooting into it. My hd config was insane so I feared rebooting – and apparently rightly so. Anyhow, I got the following unpleasant error from LILO (analogously from grub, by the way):

L 99 99 99 99 99 99 99 99 ...
(more…)

Installing Linux on an Apple G4 iBook

Leading up to my wife going to Japan, we hacked linux onto her Apple G4 iBook. It was sweet. First I’ll show you a bunch of useful stuff to see if your system is like hers, then I’ll talk about specific devices. (more…)

Internationalization with SCIM

I have SCIM and UTF-8 working smoothly with pretty much every program other than emacs. Here is a narrative of the process I went through; you can skip to the end to see immediately all of what is needed. (more…)