November 24th, 2003

  • evan

(no subject)

Still thinking about graphs. This weekend I wrote some OCaml: a functional dijkstra’s shortest-paths algorithm, and an accompanying graphviz .dot file parser (first using ocamlp4’s recursive-descent parser, then a ocamllex/yacc parser). The plan was to have dot (or neato or whichever program) lay out the nodes in the graph-- one of its output file formats is “input file with position tags added”-- and then regraph it with only the edges needed to show shortest paths. Unfortunately, I got the whole thing working only to discover that (apparently?) dot (which I was then planning to use on my output files to rerender the graphs) always redoes the node layout.

Working with OCaml is still really hard for me. The whole project would’ve been a hundred lines in a language I’m familiar with, but it ended up near 900 (though admittedly, this is much more rigorous). But if I want to be knowledgable enough about it to even be able to dismiss it, I must continue to try.
My primary observation so far is that the common claim I see about ML-- “Once your program compiles, it does the right thing”-- is very true in practice. That's really awesome and useful. On the other hand, the compiler errors you get can be really hard to track down. (Those two aren’t necessarily related: the first (good) one is a product of a strong static type system, while the second (bad) one comes from the type inference.)

Collapse )
  • evan

weekend's worth of stuff to see

justified text without using varying spacing(!).

gnome is giving away cash for (simple) patches. i oughta do that instead of spending so much time trying to make things easier on my networking students. i'm getting like a fourth of what scour paid me.

slides from the gnome summit include lots of pictures of huge linux installations (spain, brazil), and a shot of an atm running linux(!).

interview including keith packard where he basically says "yeah, linux and windows graphics are both trying to catch up to osx". but we all knew that.