[Haskell-cafe] Lazy cons, Stream-Fusion style?

Stephen Tetley stephen.tetley at gmail.com
Sun Jan 2 15:30:31 CET 2011


Hi Henning, thanks.

For me, I can live without real-time. Real-time would be nice of
course but the simplicity of Jerzy's Clarion (non-real-time, solely a
"renderer") is compelling: eliding counting the lines of code for the
stream type and the WAV file I/O, Clarion can produce audio in 2-3
lines of code which is amazing for a general purpose language rather
than a custom audio language like RTCmix or Chuck.

Un-optimized, with a head-strict stream (basically Wouter Swierstra's
Stream with a bang on the element), rendering currently takes minutes
to generate seconds. But as well as the Stream representation, I've
plenty of room to optimize the WAV file generation.

For finite signals, my initial thought is simply that the finite part
can be the prologue to a tail stream of zeros.

Probably I can live without definitions like @ ones = 1 <:> ones @, I
would like to know whether of not this is impossible with
Stream-Fusion anyway.

Thanks again.

Stephen



More information about the Haskell-Cafe mailing list