Sunday, March 28, 2010

Damned Slow

Well, the author is. Took a few days of watching DVDs and playing farmville because that logical error ain't a nice one. I figured it will disappear if I (re-)introduce the let for local computations since the fault seems to be in handling the order of, possibly local, computations. But I have grown somewhat weary of writing code, and I want, again, to have some pretty readable solution, which just didn't pop into my brain right now. Ah well, will see.

Introducing lets also might solve another problem, the fact that now, by eta-expansion and combinator lifting, too many functions are introduced.

(Argh, it might make local computations explicit, but at the expense of introducing local variables instead of function arguments.)

I tried a few forms, they all look wrong. Problem is that in the translation scheme used, a let v = e0 in e1 is inversed into a series of thunks where e1 is set up first, v refers to a position in that thunk, and e0 is reduced before e1 is reduced. The whole let thing just seems superfluous and upside-down/inside-out.

032910: Introducing lets is done, it just boils down to an old observation that the DOT representation is somewhat more convenient then ANF, but I went for ANF, since that's somewhat better readable and better known anyway.
033010: And now I am annoyed again, the lets don't play nice with the direct coding scheme I had.

Reboot.

No comments:

Post a Comment