[Haskell-cafe] Runge-Kutta and architectural style
Richard O'Keefe
ok at cs.otago.ac.nz
Mon Apr 27 00:34:27 EDT 2009
I was interested to see a Runge-Kutta package
posted to this list recently, particularly as
I have a fairly simple-minded non-adaptive RK
"generator": an AWK script that takes a table
and some optional stuff and spits out C. The
Haskell package is, of course, a lot prettier
than my AWK program, as well as offering some
adaptive methods, which is important.
We can imagine a spectrum of RK packages:
(1) Higher order function taking some runtime
parameters. That's what we got.
(2) The same specialised for a known table at
compile time. Doable using the code that
we were given plus SPECIALIZE pragmas. I
don't how well that works across modules.
(3) A generator that writes Haskell source.
(4) Template Haskell.
(5) A generator that generates native code to
be called through FFI.
The question is, how do you decide what's the
appropriate approach?
More information about the Haskell-Cafe
mailing list