[Haskell-cafe] simulation in the haskell way
bugfact at gmail.com
Tue Aug 18 09:55:53 EDT 2009
You need to look into functional reactive programming, but be warned, this
is active research :-)
Two libraries I know of in which you can currently make working simulations
are Yampa and Elerea. But the former doesn't scale really well, and the
latter might not really be functional (I think it's not referentially
Other libraries such as Reactive and Grapefruit are very promising, but I
don't know their current status.
Good luck. For me (I'm also an experienced imperative programmer in the
simulation field), Haskell is very addictive, but also insanely frustrating
because I never have the feeling I know the language well enough and I don't
see the big picture yet. So I can't yet achieve in Haskell what I can in
other languages, but purity and laziness are drugs, so you're doomed :-)
On Tue, Aug 18, 2009 at 2:42 PM, Eric Wong <wsysdu at gmail.com> wrote:
> Hello, Haskellers!
> I'm relatively new to haskell and due to my strong imperative background,
> really a pain to learn haskell. But I'm really indulged in it. :)
> Now I think I understand the basics of Haskell very well, such as the type
> system and monad. And for those data-flow kind of applications, I can
> structure the problem in a functional way and sketch out an intuitive
> of the computation. But for simulation kind-of problems, in which I think
> really fits the best, what's the haskell way to structure such problems?
> I once thought maybe I can use the State monad to simulate objects. But
> really hard for me to implement, because I think State monad is used to
> simulate a global shared state, is it right?
> Then what's the best way to simulate private states or just instead how to
> solve simulation problems such as a physical engine using the haskell way?
> Best regards.
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe