I don't really agree that in Haskell when it comes to simulation a program
just is. That is the idealized story.
At least when writing your own simulation engine, in practice you have to
deal with operational details such as future unknown values that can block
computations; to much laziness can
Eric Wong wsy...@gmail.com wrote:
I'm relatively new to haskell and due to my strong imperative
background, it's 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
Ertugrul Soeylemez e...@ertes.de wrote:
computation :: State [Object] Result
computation = do
objs0 - get
(result, objs1) - doSomethingWith objs0
put objs1
return result
Misindented, sorry. Again:
computation :: State [Object] Result
computation = do
...) But for simulation kind-of problems, in which I think OO
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 it's
really hard for me to implement, because I think State monad is used to
simulate a
On Tuesday 18 August 2009, Maurício CA wrote:
...) But for simulation kind-of problems, in which I think OO
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
it's really hard for me to
I used to think about a physical engine in a similar way, and I think it
can work. But in some simulations that objects have lots of dependencies
on others can be tricky. For instance, object o1 depends on o2, if we
represent them in pure values, when we update o2, then o1 must be
updated with a
You could read:
http://www.cs.nott.ac.uk/~nhn/FoPAD2007/Talks/nhn-FoPAD2007.pdf
http://haskell.cs.yale.edu/yale/papers/haskell-workshop03/yampa-arcade.pdf
http://www.cs.nott.ac.uk/~nhn/Talks/HW2002-FRPContinued.pdf
http://www.haskell.org/yale/papers/haskellworkshop02/index.html
Eric Wong wsy...@gmail.com wrote:
I used to think about a physical engine in a similar way, and I think
it can work. But in some simulations that objects have lots of
dependencies on others can be tricky. For instance, object o1 depends
on o2, if we represent them in pure values, when we
It is interesting to note that recent work on AFRP (arrow-based FRP) -
namely Causal Commutative Arrows - optimizes a complete circuit of arrows
(interconnected objects if you prefer to think that way) that all have
local state and local feedback loops into one large state and feedback loop,
Thanks for all your post.
When I was using C and Python, I used to think of most applications in an
simulation way. I think it's right to say that programs are simulations.
But now I have to change my mind in Haskell, I have to think in a data-flow
way, that is: data in, processing using
2009/08/18 Eric Wong wsy...@gmail.com:
When I was using C and Python, I used to think of most
applications in an simulation way.
By simulation way, do you mean object-oriented way?
--
Jason Dusek
___
Haskell-Cafe mailing list
On Tue, Aug 18, 2009 at 5:19 PM, Eric Wongwsy...@gmail.com wrote:
Thanks for all your post.
When I was using C and Python, I used to think of most applications in an
simulation way. I think it's right to say that programs are simulations.
On a philosophical note, this is a sign of expertise.
When I was using C and Python, I used to think of most applications in an
simulation way. I think it's right to say that programs are simulations.
But now I have to change my mind in Haskell, I have to think in a data-flow
way, that is: data in, processing using function composition, data out.
By simulation way, do you mean object-oriented way?
they are similar, but not equal, I think.
OO is great for simulation, but simulation does not necessarily use OO.
Virtual machine simulates real machines, you can use OO language to
do it, but most use C in the real world I think. So,
Sorry for a mistake.
Shiyou Wang is my identity in a private chinese group.
Sorry for the confusing. :-(
Eric
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
15 matches
Mail list logo