First, I finally went back and added support for clang in my
whole-program-llvm wrapper.
Usage is easy: just set LLVM_COMPILER=clang and it should Just Work.
In the process of implementing this clang support I ended up feeling
pretty bad about some of the old code. I ended up refactoring out
quite a bit and it is definitely cleaner now. I'm still not sold on
this whole "object-oriented programming" thing, but it worked
tolerably for a small chunk of Python code. The resulting object…
I've been an XMonad user for a while now. The window manager doesn't
include any status bar-type functionality, instead relying on external
programs. The two most common bars in use seem to be dzen and xmobar.
I didn't like the methods for feeding data into dzen, so I went with
xmobar. It was tolerable. I added a freedesktop.org notification
widget a few months ago and it got a little better. Unfortunately,
the text-only interface bothered me a little bit, and there was no
easy way to get a …
Like many people, I use Emacs to edit my Haskell code. The standard
haskell-mode works fine, but I always felt like I could use a bit more help
from my editor. I recently ran across
scion, which is something like
a Haskell IDE library that provides deep information about programs
to editors. It also happens to include Emacs integration.
A few notable features:
In-buffer error and warning highlighting
Expression typechecking
Completion of LANGUAGE pragmas
Go-to-definition of symbols
It does …
Sometimes it is useful to be able to analyze an entire program at
once, rather than analyzing individual compilation units. LLVM has
some infrastructure in this: the llvm-link program (and associated
library methods) combines multiple bitcode files into one as a linker
might. Unfortunately, getting all of the bitcode to pass to
llvm-link in the first place can be challenging in the face of
strange and arcane build systems (e.g., autotools, libtool, and other
impolite tools).
Official Aside
The…
I have been making my presentation slides in LaTeX Beamer for a few
years now and it is a pretty pleasant process for the various reasons
I mentioned in the previous post. More recently I decided that I
needed to depend less heavily on the staple of a staple of Beamer
presentations: the bullet point. You can generally spot a Beamer
presentation from a few miles away, and I did not really want to be
that guy any more. Without bullet points, though, what is really
left for presentation slides? …
I am currently working on the talk slides for my thesis proposal. My
preferred presentation medium is LaTeX Beamer -- a documentclass for
generating slides. It gives you access to the usual selection of
excellent LaTeX tools. Many argue that most of what LaTeX gives you
is exactly what you do not want in a presentation:
Ease of content generation without worrying about formatting
Easy abuse of well-typeset math
Lots of bullet points
While it is true that you can use these tools to make the …
This is mostly just a note to myself. Every time I get to the point
in a project where I need to debug some Haskell code, I forget some of
the more useful methods. I always seem to remember the
printf-debugging method:
import Debug.Trace
debug = flip trace
f x = y `debug` (show y)
This one just prints out the String returned by show y when y is
evaluated. This is useful for some bugs, but rarely for the kind that
I seem to inflict upon myself.
The profiling infrastructure provides anothe…
Today I finally decided to stop hosting my own git repositories and
just move to GitHub. Hosting them on my
VPS was never particularly difficult or demanding, but I was never
happy with the web interface I had set up
(cgit). cgit itself is great
and easy enough to use. I had my web server just dispatch CGI
requests to it and everything was fine. The only problem was that I
didn't put enough effort into making it fit with the rest of my site
visually. I was also never quite sure about the st…
I keep forgetting to update this blog. I feel bad about that; I
thought that I would have more free time after I finished taking
classes. I am going to try to force myself to update more frequently.
I won't force myself to make the content insightful, though.
Anyway, I have been writing code in Haskell lately, and the
haskell-mode for emacs is very good. This mode has support for
replacing common multi-character operators and identifiers with their
Unicode equivalents. For example, -> bec…
I am not really a huge fan of browser extensions. Most seem kind of
excessive or silly and can easily make the browser seem slower than it
really is. That said, I do appreciate the extensions that let me
browse more easily without using a mouse.
The most important feature that I want from a browser is to be able to
easily select links to follow using the keyboard. The typical user
interface for this feature is to label each link with hints after
some keystroke is hit; you follow a link by typ…