Unification with unification-fd

I finally feel like a real programming languages person. I just used unification to solve a problem besides type checking a variant of the lambda calculus. I used the excellent unification-fd package; it is a bit light on documentation but the included tests were enough for me to figure out how to use it. I might post something more detailed later on. My problem arose due to the type system rewrite in LLVM 3.0. Prior to this, types were all uniqued: there was one instance of each structurall…

Blog Published to Github

I just put the code for this blog up on github. This gives me another backup and could serve as an example for how to use Hakyll. One more example of Hakyll 3 never hurt anyone.

IPv6 Support

I enabled IPv6 on the machine hosting this blog a few months ago, but I hadn't actually tested it. In fact, I don't have any other hosts with IPv6 support so I can't really test it myself. Since World IPv6 Day is coming soon, I decided it was time to get things working. Looking around, I found an IPv6 website validator, which actually let me figure out if things were working out. There were just two problems: My AAAA DNS record didn't transfer automatically when I switched from GoDaddy My we…

Libtool Annoyances

I have a set of scripts (available on github) that I use to generate whole-program LLVM bitcode files. They are used as drop-in replacements for gcc that compile code twice: once to a normal object file and once to a bitcode file. Ideally, these scripts can be substituted in via environment variables in the typical fashion: CC=wllvm CFLAGS="-O0 -g" ./configure make make install Until now, this worked for many libraries, but often ran into trouble with some libraries that used libtoo…

Chili of the Deep

This weekend we had our annual chili party (coinciding with the Polar Plunge). In lieu of jumping into a frozen lake, I decided to just make chili. I'm recording the recipe here for posterity and so that I don't have to try to guess at what I did next year. Chili of the Deep Makes about 40 pounds 2-3 hour prep time 8 hour cook time Ingredients 6 large onions 4 pounds beans 6 large cans of diced and/or crushed tomatoes 3 cans of tomato paste 4 pounds of stew beef 4 pounds of bacon 1 pound of…

One More Blog

Another year, another blog. It seems that I just re-wrote my blog for the third time. The Second Rewrite I never deployed the second rewrite, which was mostly for fun and to play with yesod. Despite my reservations about its use of Template Haskell and quasiquotes, I eventually came around to the whole model suggested by the framework. Type-safe URLs are very pleasant and the automatic routing of requests to typed handlers is a huge time and boilerplate saver. After I got the hang of the fra…

Hackage and Haddock

It looks like the documentation for my taffybar package is finally being built on Hackage. I am confused because I certainly didn't change anything relevant in my packaging. It works, though, so I'm not going to complain.

Research Paper Tracking

The other day I saw someone mention Mendeley as a tool for tracking and annotating papers (along with BibTeX entries). I've been impressed so far. It can import PDFs and, as long as their metadata is reasonably correct, it can usually figure everything out for you. If it fails, you can just feed it the DOI for the paper and it looks up all of the metadata for you. It has fancy "cloud" and "social" features, but I think I can forgive that. Time will tell.

GHC and C++

Recently I was getting error messages from GHC while building Haskell programs that complain about unknown symbols referring to C++ standard template library symbols. It turns out that these are weak symbols (since only one definition is required) and telling ghc to pass the extra (forbidden, deprecated, and evil) -fno-weak flag to gcc helps. I guess I am in trouble when this flag is finally removed. After changing this, the compiler complained that it could not find libstdc++.so. A ghc bug de…

C++ Calling Conventions

My advisor presented me with an interesting problem the other day. Calling some simple C++ free functions that took C++ objects by value using Python's ctypes produced strange results. We eventually narrowed the test case down to the following: 1#include <stdio.h> 2 3struct Simple { 4 int x,y,z; 5}; 6 7struct Fancy { 8 int x,y,z; 9 ~Fancy() { 10 printf("Destroying a Fancy\n"); 11 } 12}; 13 14extern "C" { 15 void printSimple(Simple s) { 16 fprintf(stderr, &qu…