Monthly Archives: February 2008

Call-by-Future

I was reading about evaluation strategies for lambda calculus on Wikipedia, and one caught my eye: “call-by-future”. The idea behind this strategy is that you evaluate the function and its argument in parallel. It’s like lazy evaluation, except you start evaluating earlier. Call by future semantics are non-strict, so I figured I [...]

Spiffy GADT Thing

Take a look at this C++ code:

class Base {
public:
virtual ~Base() { }
};
class Derived : public Base {
public:
virtual void talk() { cout << “What’s up?”; }
};
void test(Base* b) {
if (dynamic_cast<Derived*>(b)) {
b->talk();
[...]

Dependent Types for Compile Time

I’ve been reading some of Simon Peyton Jones’s papers on type families, and he mentions types representing Peano numerals, namely:

data Zero
data Succ a

And then proceeds to implement arithmetic like this:

type family Add a b :: *
type instance Add Zero x = x
[...]

Fregl: an introduction to FRP

I’ve been mentioning quite a bit about my latest FRP implementation. First things first: You can find it here. The implementation is called “Fregl”, for “Functional Reactive Game Library”, roughly. But I thought I would take a moment to describe it and some of the directions I plan on taking it. [...]

Sleepless Night

It’s one of those nights again. A night I am tired enough to sleep, but I just don’t want to for a reason that evades me. Instead, I’m staying up watching bad movies and wasting time. One way, I thought, to waste time would be to write some nonsense in my blog.
My [...]