
So I'm also doing a lot of simulations, and have experimented with FRP as a basic toolset for defining my simulations. I experimented with Netwire for a while, and while I still think it's a good library, I eventually threw it away to rely simply on Mealy Arrows (Netwire is Arrow based FRP). From what I've seen, the point of FRP libraries is to handle interactivity. That's what all the functions in the libraries are about. If you do have a virtual time stream that you can simply define at runtime and doesn't require side effects, you may find, as I did, that you'll create a simplified type synonym for the FRP structure that you're working with, and then not really using the libraries at all. The point is ultimately that, although pure simulations could nicely be part of any more complicated FRP program, if all you want is to do pure simulations, then you'll be introducing a fair bit of computational/structural overhead to fit it within the FRP framework, without any real payoff. Cheers, - Sacha On 17/03/14 10:50 AM, haskell-cafe-request@haskell.org wrote:
Message: 1 Date: Sun, 16 Mar 2014 14:23:37 +0100 From: martin
To:haskell-cafe@haskell.org Subject: [Haskell-cafe] FRP, Simulations and Time (Sodium et. al) Message-ID:<5325A5D9.8070408@web.de> Content-Type: text/plain; charset=ISO-8859-15 FPR is usually described as a way to model interactions with the real world. I believe the same ideas should be applicable to simulations. Instead of "real" events I would use fake events. This however only makes sense when the Time associated with the Events (and Behaviors) is not wallclock time, but some kind of virtual time.
I looked briefly into Sodium and found no way to use "my own time". Steven Blackheath even said during a presentation, that Time in Sodium is just another Behavior. I am not sure if I understood this correctly, but it gives me the feeling, that the only Time available in Sodium is wallclock time, which would make it unsuitable for simulations.
Could someone give me some insights whether or not FRP is suitable for simulations?
Does my reasoning about Time make any sense? Do different libraries treat Time in different ways, such that some are suitable for simulations, while others are not?
Martin