Re: [Haskell-cafe] HANSEI in Haskell?

2011-02-28 Thread Chung-chieh Shan
Daryoush Mehrtash dmehrt...@gmail.com wrote in haskell-cafe: I am confused about this comment: Mostly we preferred (as do the domain experts we target) to write probabilistic models in direct style rather than monadic In the haskell implementation of the lawn model there are two different

Re: [Haskell-cafe] HANSEI in Haskell?

2011-02-28 Thread Daryoush Mehrtash
I see the problem now. But I am confused as to why there are no Bool class (like Num, Fractional...) in Haskell. If I had such a class then the problem is solved, (by making the pm a an instance of it) right? Or are there still more issues that I am not seeing? thanks, daryoush On Mon, Feb

Re: [Haskell-cafe] HANSEI in Haskell?

2011-02-28 Thread Chung-chieh Shan
Daryoush Mehrtash dmehrt...@gmail.com wrote in article AANLkTim0LTOviud2fyzU7NAsraQMuCKa=qyfroxn8...@mail.gmail.com in gmane.comp.lang.haskell.cafe: I see the problem now. But I am confused as to why there are no Bool class (like Num, Fractional...) in Haskell. If I had such a class then

Re: [Haskell-cafe] HANSEI in Haskell?

2011-02-27 Thread Daryoush Mehrtash
I am confused about this comment: Mostly we preferred (as do the domain experts we target) to write probabilistic models in direct style rather than monadic In the haskell implementation of the lawn model there are two different version of the grassModel (

Re: [Haskell-cafe] HANSEI in Haskell?

2011-02-24 Thread oleg
The topic of HANSEI in Haskell does come up from time to time. In fact, there was a Haskell edition of the first version of Hansei: http://okmij.org/ftp/kakuritu/probM.hs It was written to see how the code would look in Haskell, and how memoization (inherent in lazy evaluation of GHC)

Re: [Haskell-cafe] HANSEI in Haskell?

2011-02-24 Thread Arnaud Clère
On 24/02/2011 09:30, o...@okmij.org wrote: The sort of laziness needed for non-deterministic programming calls for first-class store. It can be emulated, albeit *imperfectly*, for example, as was described in the ICFP09 paper. What do you mean by imperfectly? Do you think implementing

Re: [Haskell-cafe] HANSEI in Haskell?

2011-02-24 Thread Chung-chieh Shan
Arnaud Clère arnaud.cl...@free.fr wrote in article ik64e9$j6a$1...@dough.gmane.org in gmane.comp.lang.haskell.cafe: On 24/02/2011 09:30, o...@okmij.org wrote: The sort of laziness needed for non-deterministic programming calls for first-class store. It can be emulated, albeit *imperfectly*,

Re: [Haskell-cafe] HANSEI in Haskell?

2011-02-24 Thread Chung-chieh Shan
Leon Smith leon.p.sm...@gmail.com wrote in article AANLkTikF6EX4U+uTwNcrdFZPj-ijTWb74o2W_RJMGOe=@mail.gmail.com in gmane.comp.lang.haskell.cafe: On Wed, Feb 23, 2011 at 10:52 AM, Chung-chieh Shan ccs...@cs.rutgers.edu wrote: Mostly we preferred (as do the domain experts we target) to write

Re: [Haskell-cafe] HANSEI in Haskell?

2011-02-24 Thread Antoine Latter
On Thu, Feb 24, 2011 at 12:57 PM, Chung-chieh Shan ccs...@cs.rutgers.edu wrote: Arnaud Clère arnaud.cl...@free.fr wrote in article ik64e9$j6a$1...@dough.gmane.org in gmane.comp.lang.haskell.cafe: On 24/02/2011 09:30, o...@okmij.org wrote: The sort of laziness needed for non-deterministic

Re: [Haskell-cafe] HANSEI in Haskell?

2011-02-24 Thread Chung-chieh Shan
On 2011-02-24T16:20:46-0600, Antoine Latter wrote: On Thu, Feb 24, 2011 at 12:57 PM, Chung-chieh Shan wrote: What we need is a way to tell the garbage collector that the store reference and the cell reference are both needed to access the data so the data can be garbage-collected as soon

Re: [Haskell-cafe] HANSEI in Haskell?

2011-02-24 Thread Antoine Latter
On Thu, Feb 24, 2011 at 10:15 PM, Chung-chieh Shan ccs...@cs.rutgers.edu wrote: On 2011-02-24T16:20:46-0600, Antoine Latter wrote: On Thu, Feb 24, 2011 at 12:57 PM, Chung-chieh Shan wrote: What we need is a way to tell the garbage collector that the store reference and the cell reference

Re: [Haskell-cafe] HANSEI in Haskell?

2011-02-23 Thread Chung-chieh Shan
Hello! Thank you for your interest. Daryoush Mehrtash dmehrt...@gmail.com wrote in haskell-cafe: Is the Embedded domain-specific language HANSEI for probabilistic models and (nested) inference described in: http://okmij.org/ftp/kakuritu/index.html#implementation available in Haskell? The

Re: [Haskell-cafe] HANSEI in Haskell?

2011-02-23 Thread Daryoush Mehrtash
I would very much appreciate if you can expand on this: Haskell's laziness doesn't help -- in fact, to avoid running out of memory, we'd have to defeat that memoization by sprinkling () - throughout the types. Would it be possible to explain this with an example? Thanks Daryoush On Wed,

Re: [Haskell-cafe] HANSEI in Haskell?

2011-02-23 Thread Leon Smith
On Wed, Feb 23, 2011 at 10:52 AM, Chung-chieh Shan ccs...@cs.rutgers.edu wrote: Mostly we preferred (as do the domain experts we target) to write probabilistic models in direct style rather than monadic style. Haskell's laziness doesn't help -- in fact, to avoid running out of memory, we'd

[Haskell-cafe] HANSEI in Haskell?

2011-02-20 Thread Daryoush Mehrtash
Is the Embedded domain-specific language HANSEI for probabilistic models and (nested) inference described in: http://okmij.org/ftp/kakuritu/index.html#implementation available in Haskell? Is there a reason why the author did the package in Ocaml rather than Haskell? -- Daryoush