Re: [Haskell-cafe] Detecting Cycles in Datastructures

2005-11-27 Thread Andrew Pimlott
On Fri, Nov 18, 2005 at 11:37:40AM -0500, Paul Hudak wrote: > This is a very late response to an old thread... ditto :-) > > unwind :: Expr -> Expr > > unwind (Add e1 e2) = Add (unwind e1) (unwind e2) > > unwind (Rec fe)= x where x = unwind (fe x) > > unwind e = e Since this discus

Re: [Haskell-cafe] Detecting Cycles in Datastructures

2005-11-27 Thread jerzy . karczmarczuk
Andrew Pimlott: //about my highly spiritual essay on lazy computing of PI//: In addition to being clever and terribly funny, the conclusion foreshadows (inspired?) later work on Enron [1]. Come on, it is improbable that Master Simon ever read my essay... No,... no comparison. His work on c

[Haskell-cafe] STM, IO and event loops

2005-11-27 Thread Joel Reymont
Folks, I'm trying to build an event-driven system that includes multiple event channels. I would have one channel for network events and another one for events sent by other threads. I would like to use STM and `orElse` to poll the various event channels. Is there a reasonably safe way to

Re[2]: [Haskell-cafe] Monads in Scala, XSLT, Unix shell pipes was Re: Monads in ...

2005-11-27 Thread Bulat Ziganshin
Hello Greg, Saturday, November 26, 2005, 8:25:38 PM, you wrote: GW> Maybe this is a different topic, but exploring concurrency in Haskell GW> is definitely on my "to do" list, but this is really a bit of a puzzle. GW> One thing I've been thinking lately is that in functional programming GW> the p

Re[2]: Dataflow and Comonads was Re: [Haskell-cafe] Monads in Scala, ...

2005-11-27 Thread Bulat Ziganshin
Hello Bill, Sunday, November 27, 2005, 1:25:59 AM, you wrote: BW> The one downside I found to using dataflow was that most software people BW> seem to be uncomfortable with the lack of identifiable processes doing BW> significant bits of work. I guess if they they're not floundering BW> around i

Re: [Haskell-cafe] Monads in Scala, XSLT, Unix shell pipes was Re: Monads in ...

2005-11-27 Thread jerzy . karczmarczuk
Bulat Ziganshin: for pure functional computations concurrency is just one of IMPLEMENTATION mechanisms, and it doesn't appear in abstractions DEFINITIONS Well, there are formal aspects of the specification of concurrency as well. Do you claim that no language has the right to demand *abstract

Re: [Haskell-cafe] STM, IO and event loops

2005-11-27 Thread Bulat Ziganshin
Hello Joel, Sunday, November 27, 2005, 2:12:23 PM, you wrote: JR> My poker bots are launched in separate threads but do not talk to JR> each other right now. They just receive events from the network. I JR> would like a poker bot to tell others to stop playing and exit, for JR> example. use

Re[2]: [Haskell-cafe] Monads in Scala, XSLT, Unix shell pipes was Re: Monads in ...

2005-11-27 Thread Bulat Ziganshin
Hello jerzy, Sunday, November 27, 2005, 3:49:07 PM, you wrote: >> for pure functional computations concurrency is just one of >> IMPLEMENTATION mechanisms, and it doesn't appear in abstractions >> DEFINITIONS jkiuf> Well, there are formal aspects of the specification of concurrency as well. jk

Re: Re[2]: [Haskell-cafe] Monads in Scala, XSLT, Unix shell pipes was Re: Monads in ...

2005-11-27 Thread Greg Woodhouse
--- Bulat Ziganshin <[EMAIL PROTECTED]> wrote: > Hello Greg, > > for pure functional computations concurrency is just one of > IMPLEMENTATION mechanisms, and it doesn't appear in abstractions > DEFINITIONS > I suppose it depends a bit on the question you're asking. A multiprocessor, considered

[Haskell-cafe] Shortening if-then-else

2005-11-27 Thread tpledger
Arjan van IJzendoorn wrote: | > Is there a shorter way to write the if-then-else part below? | >if (cmdType cmd) /= (CmdSitError Server) | > then return $ Just seat_num | > else return Nothing | | return $ if cmdType cmd /= CmdSitError Serv | then Jus

Re: Re[2]: [Haskell-cafe] Monads in Scala, XSLT, Unix shell pipes was Re: Monads in ...

2005-11-27 Thread Bill Wood
(I'm going to do a lazy permute on your stream of consciousness; hope it terminates :-). I think the Rubicon here is the step from one to many -- one function/procedure to many, one thread to many, one processor to many, ... . Our favorite pure functions are like the Hoare triples and Dijkstra we

Re: [Haskell-cafe] Haskell GUI on top of Xlib?

2005-11-27 Thread Thomas Hallgren
Hi, Dimitry Golubovsky wrote: Do there exist Haskell graphics/UI toolkits implemented on top of the X11 library (Xlib) without any intermediate C/C++ libraries (i. e. not WxHaskell for example)? Fudgets is a GUI toolkit implemented in Haskell directly on top of Xlib: http://www.cs.chalme