We provide a novel achievability proof of the Slepian-Wolf theorem for i.i.d. sources over finite alphabets. We demonstrate that random codes that are linear over the real field achieve the classical Slepian-Wolf rate region. For finite alphabets we show that decoding is equivalent to solving an integer program. The techniques used may be of independent interest for code design for a wide class of information theory problems, and for the field of compressed sensing.