Sunday, April 22, 2012

micro-ochre

Copperbox revisions 2737 & 2738.

I've changed the rewrite passes to use explicit environments rather than use a combined monad wrapping the Fresh monad with a Reader. Using Reader wasn't simplifying the code enough.

(Not committed...) I went down something of a rabbit hole adding Lam and App to the top-level syntax. The idea was to allow modularization in the instruments that would be compiled out with inline expansion (Csound has nothing to readily compile user-specified procedures into). However the implementation wasn't very good - new rewrite rules could throw errors if the syntax wasn't right and I wasn't sure if I'd accounted for all the possibly valid translations. As the language will be embedded in Haskell I think I can just use Haskell (the meta-language) for abstraction.

If I'm successful with micro-ochre, I have plans for a version of Wumpus with user-level procedural abstraction to tackle the current code explosion in the generated PostScript. In this case I don't think I will want inline expansion either as I want the smallest code possible.

Blog Archive

About Me

My photo
Disambiguating biog as there are a few Stephen Tetley's in the world. I'm neither a cage fighter or yachtsman. I studied Fine Art in the nineties (foundation Bradford 1992, degree Cheltenham 1992 - 95) then Computing part-time at Leeds Met graduating in 2003. I'm the Stephen Tetley on Haskell Cafe and Stackoverflow.