[Haskell-cafe] Haskell and artificial intelligence

2005-08-22 Thread Santoemma Enrico
Hello, is there any group or person working on this topic in Haskell? I'm massaging some code for an autonomous agent, and I'd like to share ideas. Enrico ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] FFI and callbacks

2005-08-22 Thread Gracjan Polak
Duncan Coutts wrote: Most toolkits with a main loop system allow you to setup timers. In the Gtk2Hs bindings we can use this trick: -- 50ms timeout, so GHC will get a chance to scheule about 20 times a second -- which gives reasonable latency without the polling generating too much -- cpu

Re: [Haskell-cafe] FFI and callbacks

2005-08-22 Thread Sebastian Sylvan
On 7/23/05, Duncan Coutts [EMAIL PROTECTED] wrote: On Wed, 2005-07-20 at 16:10 +0100, Simon Marlow wrote: On 20 July 2005 14:35, John Goerzen wrote: I'm looking at packaging an event-driven console widget set (CDK) for Haskell using FFI. I know that other event-driven widget sets have

Re: [Haskell-cafe] FFI and callbacks

2005-08-22 Thread Duncan Coutts
On Mon, 2005-08-22 at 15:45 +0200, Sebastian Sylvan wrote: I haven't found any issues with wxHaskell misbehaving when it's called from different threads, but I'd like to know for sure that it's actually honest-to-goodness thread safe. So does anyone know? Actually here's an even more direct

[Haskell-cafe] Pattern match failure, then inconsistent function behavior

2005-08-22 Thread Adam Wyner
Hi, I am getting a pattern match failure, and then a function which worked right works wrong. I am using Hugs and Trex. While most of the other functions in my module work fine, the function findCoordinatesUtil generates an error, then misbehaves. The function takes a record and a list of

RE: [Haskell-cafe] Re: Oracle + Haskell advice?

2005-08-22 Thread Bayley, Alistair
From: Keean Schupke [mailto:[EMAIL PROTECTED] Still I now know that HaskellDB has significant limitations, and the relational algebra approach I took is far more robust and flexable... ... there's no documentation. If anyone were interested in using/contributing I could give CVS access

RE: [Haskell-cafe] Re: Oracle + Haskell advice?

2005-08-22 Thread Bayley, Alistair
From: Brian Strand [mailto:[EMAIL PROTECTED] Reviewing at the bind variable code has highlighted a glaring design flaw: you can only pass homogenous lists of bind values! I was wondering about that; I thought maybe you just passed everything to OCI as String and let Oracle sort

[Haskell-cafe] Need a concurrency advice

2005-08-22 Thread Dinh Tien Tuan Anh
Hi, Basically, my program has 7 threads for 7 rules Rule1 Rule2 .. .. .. and they all use pattern-mattching (a rule MUST be evaluated by a thread) The problem is there are some overlapping rules, which match the same pattern and diifferent rules are likely to give different results (one

Re: [Haskell-cafe] FFI and callbacks

2005-08-22 Thread Sebastian Sylvan
On 8/22/05, Duncan Coutts [EMAIL PROTECTED] wrote: On Mon, 2005-08-22 at 15:45 +0200, Sebastian Sylvan wrote: I haven't found any issues with wxHaskell misbehaving when it's called from different threads, but I'd like to know for sure that it's actually honest-to-goodness thread safe. So

[Haskell-cafe] RE: Random matrices

2005-08-22 Thread Scherrer, Chad
Ah ha. That'll do. Lesson: avoid hidden space leaks in monads. Hmm, I'm still missing something. It seems a good lesson, but practically speaking, it doesn't help me any more than saying write efficient programs. What could I have looked for in the original code to predict it may be leaky? Is

Re: [Haskell-cafe] FFI and callbacks

2005-08-22 Thread Duncan Coutts
On Mon, 2005-08-22 at 18:13 +0200, Sebastian Sylvan wrote: On 8/22/05, Duncan Coutts [EMAIL PROTECTED] wrote: On Mon, 2005-08-22 at 15:45 +0200, Sebastian Sylvan wrote: I haven't found any issues with wxHaskell misbehaving when it's called from different threads, but I'd like to know

[Haskell-cafe] Re: Category theory monad ---- Haskell monad

2005-08-22 Thread Chung-chieh Shan
Michael Vanier [EMAIL PROTECTED] wrote in article [EMAIL PROTECTED] in gmane.comp.lang.haskell.cafe: Basically, though, the Haskell implementation _is_ the category theoretic definition of monad, with bind/return used instead of (f)map/join/return as described below. Doesn't the Haskell

Re: [Haskell-cafe] Re: Category theory monad ---- Haskell monad

2005-08-22 Thread Cale Gibbard
On 22/08/05, Chung-chieh Shan [EMAIL PROTECTED] wrote: Michael Vanier [EMAIL PROTECTED] wrote in article [EMAIL PROTECTED] in gmane.comp.lang.haskell.cafe: Basically, though, the Haskell implementation _is_ the category theoretic definition of monad, with bind/return used instead of

Re: [Haskell-cafe] Functional dependencies and type inference

2005-08-22 Thread Thomas Jäger
Simon, I believe there may be some nasty interactions with generalized newtype-deriving, since we can construct two Leibniz-equal types which are mapped to different types using fundeps: class Foo a where foo :: forall f. f Int - f a instance Foo Int where foo = id newtype Bar =

[Haskell-cafe] Re: Random matrices

2005-08-22 Thread Donald Bruce Stewart
Chad.Scherrer: Ah ha. That'll do. Lesson: avoid hidden space leaks in monads. Hmm, I'm still missing something. It seems a good lesson, but practically speaking, it doesn't help me any more than saying write efficient programs. What could I have looked for in the original code to

Re: [Haskell-cafe] Need a concurrency advice

2005-08-22 Thread Dean Herington
At 3:39 PM + 8/22/05, Dinh Tien Tuan Anh wrote: Hi, Basically, my program has 7 threads for 7 rules Rule1 Rule2 .. .. .. and they all use pattern-mattching (a rule MUST be evaluated by a thread) The problem is there are some overlapping rules, which match the same pattern and diifferent

[Haskell-cafe] Pattern match failure, then inconsistent function

2005-08-22 Thread Adam Wyner
Hi, I am getting a pattern match failure, and then subsequent functions which worked right work wrong. I am using Hugs and Trex. While most of the other functions work fine, the function findCoordinatesUtil generates an error, then misbehaves; it takes a record and searches a list of records