ezyang’s blog

the arc of software bends towards understanding

August, 2010

Defining “Haskelly”

At risk of sounding like a broken record, the topic of this post also sprang from abcBridge. John Launchbury asked a question during my presentation that got me thinking about API design in Haskell. (By the way, the video for the talk is out! Unfortunately, the second half had to be cut out due to […]

  • August 30, 2010

Interrupting GHC

In my tech talk about abcBridge, one of the “unsolved” problems I had with making FFI code usable as ordinary Haskell code was interrupt handling. Here I describe an experimental solution involving a change to the GHC runtime system as suggested by Simon Marlow. The introductory section may be interesting to practitioners looking for working […]

  • August 27, 2010

abcBridge: Functional interfaces for AIGs and SAT solving

Yesterday I gave a Galois Tech Talk about abcBridge, a set of bindings in Haskell for ABC that I built over the summer as part of my internship. There should be a video soon, but until then, you can download my annotated slides. The software’s not public yet, but hopefully it will be soon.

  • August 25, 2010

Type Kata: Distinguishing different data with the same underlying representation

Punning is the lowest form of humor. And an endless source of bugs. The imperative. In programming, semantically different data may have the same representation (type). Use of this data requires manually keeping track of what the extra information about the data that may be in a variable. This is dangerous when the alternative interpretation […]

  • August 23, 2010

Day in the life of a Galois intern

Vrrmm! Vrrmm! Vrrmm! It's 9:00AM, and the cell phone next to my pillow is vibrating ominously. I rise and dismiss the alarm before it starts ringing in earnest and peek out the window of my room. Portland summer is a fickle thing: the weather of the first month of my internship was marked by mist […]

  • August 20, 2010

Type kata: Controlled sharing of references

The imperative. Mutable data structures with many children frequently force any given child to be associated with one given parent data structure: class DOMNode { private DOMDocument $ownerDocument; // ... public void appendNode(DOMNode n) { if (n.ownerDocument != this.ownerDocument) { throw DOMException("Cannot append node that " "does not belong to this document"); } // ... […]

  • August 18, 2010

What high school Algebra quizzes and NP-complete problems have in common

What I did for my summer internship at Galois World of algebra quizzes. As a high schooler, I was using concepts from computer science long before I even knew what computer science was. I can recall taking a math quiz—calculators banned—facing a difficult task: the multiplication of large numbers. I was (and still am) very […]

  • August 16, 2010

Generalizing APIs

Edit. ddarius pointed out to me that the type families examples were backwards, so I’ve flipped them to be the same as the functional dependencies. Type functions can be used to do all sorts of neat type-level computation, but perhaps the most basic use is to allow the construction of generic APIs, instead of just […]

  • August 13, 2010

A radical Hackage social experiment

Prologue. This post is an attempt to solidify some of the thoughts about the upcoming Hackage 2.0 that have been discussed around the Galois lunch table. Note that I have never overseen the emergence of a language into mainstream, so take what I say with a grain of salt. The thesis is that Hackage can […]

  • August 11, 2010

Paper Monday

Over the weekend, I took the Greyhound up to Seattle to meet up with some friends. The Greyhound buses was very late: forty-five minutes in the case of the trip up, which meant that I had some time to myself in the Internet-less bus station. I formulated the only obvious course of action: start working […]

  • August 9, 2010