
Hello, Some months ago I uploaded a little package called 'repr' to hackage. I've now updated the package to work with ghc-6.12.1 and its new base library 4.2.0.0. Back then I forgot to make a proper announcement so I will do that now: 'repr' allows you to render overloaded expressions to their textual representation. For example: *Repr> let rd = 1.5 + 2 + (3 + (-4) * (5 - pi / sqrt 6)) :: Repr Double *Repr> show rd "fromRational (3 % 2) + 2 + (3 + negate 4 * (5 - pi / sqrt 6))" See: http://hackage.haskell.org/package/repr-0.3.2 regards, Bas

Where do you make use of it? :) Andrey -- View this message in context: http://old.nabble.com/ANNOUNCE%3A-repr-0.3.2-tp26908749p26909005.html Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com.

On Thu, Dec 24, 2009 at 1:00 AM, Andrey Sisoyev
Where do you make use of it? :)
A few months ago I was working on 'levmar'[1] a Levenberg-Marquardt data fitting library in Haskell. If you want your data fitting to be really fast you need to supply a Jacobian of the model function you want to fit. A Jacobian describes the partial derivatives of the parameters of the model function. I used Conal Elliott's vector-space[2] library to automatically derive a Jacobian from the model function. I was interested in the derivatives vector-space would come up with. A derivative however, is just a function so the only thing you can do with it is apply it to a value. This then yields a result which is usually just a Double. I wasn't really interested in this actual numeric result but more in the underlying numeric expressing that generated that result. So I wrote repr to visualize this numeric expression. However, after I wrote repr, the work on levmar stalled a bit and I did not actually get around to applying repr to the derivatives. I plan to make a new release of levmar in the coming weeks or so and I think I will use repr then. regards, Bas [1] http://hackage.haskell.org/package/levmar [2] http://hackage.haskell.org/package/vector-space

Did you consider using the traced package?
2009/12/24 Bas van Dijk
On Thu, Dec 24, 2009 at 1:00 AM, Andrey Sisoyev
wrote: Where do you make use of it? :)
A few months ago I was working on 'levmar'[1] a Levenberg-Marquardt data fitting library in Haskell. If you want your data fitting to be really fast you need to supply a Jacobian of the model function you want to fit. A Jacobian describes the partial derivatives of the parameters of the model function. I used Conal Elliott's vector-space[2] library to automatically derive a Jacobian from the model function.
I was interested in the derivatives vector-space would come up with. A derivative however, is just a function so the only thing you can do with it is apply it to a value. This then yields a result which is usually just a Double. I wasn't really interested in this actual numeric result but more in the underlying numeric expressing that generated that result.
So I wrote repr to visualize this numeric expression. However, after I wrote repr, the work on levmar stalled a bit and I did not actually get around to applying repr to the derivatives. I plan to make a new release of levmar in the coming weeks or so and I think I will use repr then.
regards,
Bas
[1] http://hackage.haskell.org/package/levmar [2] http://hackage.haskell.org/package/vector-space _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
participants (3)
-
Andrey Sisoyev
-
Bas van Dijk
-
Lennart Augustsson