I have tried. Using just normal lists, I found it difficult to avoid huge space leaks, but once things are working, the end result is easy to reason about.<br><br>I'm considering giving it another try using Stream Processors or some form of Arrows instead of lists. I think this strategy might allow me to do several transformations of the same input list in pseudo-parallel, which would allow the GC to collect old data as soon as its not needed by the computation that decides when to buy and sell. The Stream Processor library I was looking at uses Continuation Passing Style, which I don't know too much about, and I'm not sure Arrows will work out.
<br><br>Generalizing the problem, how does one express: "given multiple transformations of an infinite numeric list, perform some IO at the first instance some predicate is met"?<br><br>I feel that Arrows might somehow trivially allow me to compute on huge
lists without leaking, but don't understand them well enough to
apply them.<br><br>If one could write an arrow that applies the transformations to the input list in parallel, then I'd think you could solve the above example something like this:<br>(f &&& g) >>> dropWhile (\(x,y) -> x > 0 && y > 0) >>> performSomeIO
<br><br>Maybe <+> is the arrow operator I'm looking for, not &&&, but to be honest, the documentation for Arrows blows my mind. I think a few examples would go a long way.<br><br>Thanks,<br>Greg<br><br>
<br><div><span class="gmail_quote">On 7/6/06, <b class="gmail_sendername">Joel Reymont</b> <<a href="mailto:joelr1@gmail.com">joelr1@gmail.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Is anyone using Haskell for heavy numerical computations? Could you<br>share your experience?<br><br>My app will be mostly about running computations over huge amounts of<br>stock data (time series) so I'm thinking I might be better of with
<br>OCaml.<br><br> Thanks, Joel<br><br>--<br><a href="http://wagerlabs.com/">http://wagerlabs.com/</a><br><br><br><br><br><br>_______________________________________________<br>Haskell-Cafe mailing list<br><a href="mailto:Haskell-Cafe@haskell.org">
Haskell-Cafe@haskell.org</a><br><a href="http://www.haskell.org/mailman/listinfo/haskell-cafe">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br></blockquote></div><br>