Re: [Haskell-cafe] do you have to use fix with forkio?

2009-03-06 Thread Daryoush Mehrtash
Two questions: a) This chat server implementation doesn't actually close the connection as a real one would need to do. If you use forever is there a way to end the loop so as to end the connection? b) In Section 5 of this paper: http://www.cs.yale.edu/~hl293/download/leak.pdf Comparing

Re: [Haskell-cafe] do you have to use fix with forkio?

2009-03-06 Thread Lennart Augustsson
Personally I would not use fix. I don't think it improves readability. -- Lennart 2009/3/5 Daryoush Mehrtash dmehrt...@gmail.com: In this chat server implementation http://www.haskell.org/haskellwiki/Implement_a_chat_server forkIO is used with fix as in: reader - forkIO $ fix $

RE: [Haskell-cafe] Haskell Logo Voting will start soon!

2009-03-06 Thread Bayley, Alistair
The voting system we'll use is the Condorcet Internet Voting System (http://www.cs.cornell.edu/andru/civs.html ). The poll won't be public, but every subscriber to Haskell-Cafe will get a (private) voting ballot by email. I'll supervise the poll and make sure it's started, stopped and

[Haskell-cafe] Re: Interesting problem from Bird (4.2.13)

2009-03-06 Thread Gleb Alexeyev
Gleb Alexeyev wrote: instance Eq a = Eq (CatList a) where a == b = case (viewCL a, viewCL b) of (Just (x, xs), Just (y, ys)) - x==y xs == ys (Nothing, Nothing) - True _- False I just realized that my solution

Re: [Haskell-cafe] Haskell Logo Voting will start soon!

2009-03-06 Thread Magnus Therning
On Fri, Mar 6, 2009 at 9:08 AM, Bayley, Alistair alistair.bay...@invesco.com wrote: The voting system we'll use is the Condorcet Internet Voting System (http://www.cs.cornell.edu/andru/civs.html ).  The poll won't be public, but every subscriber to Haskell-Cafe will get a (private) voting

RE: [Haskell-cafe] Haskell Logo Voting will start soon!

2009-03-06 Thread Bayley, Alistair
I'd love to hear about anything that I missed and/or that might influence the voting process in a significant way.  (There are probably some people subscribed with multiple addresses, but I'll be using the subscriber list from yesterday, so signing up now with lots of addresses won't

Re: [Haskell-cafe] Re: [Haskell] Lazy IO breaks purity

2009-03-06 Thread Duncan Coutts
On Thu, 2009-03-05 at 13:08 +, Simon Marlow wrote: Lennart Augustsson wrote: I don't see any breaking of referential transparence in your code. Every time you do an IO operation the result is basically non-deterministic since you are talking to the outside world. You're assuming the

[Haskell-cafe] FRP + physics / status of hpysics

2009-03-06 Thread Peter Verswyvelen
Regarding hpysics, did anybody did some experiments with this? The blog seems to be inactive since december 2008; has development ceased? Do alternatives exist? Maybe good wrappers (hopefully pure...) around existing engines? Integrating hpysics with Grapefruit might be a good topic for the

Re: [Haskell-cafe] Re: Haskell Logo Voting will start soon!

2009-03-06 Thread Eelco Lempsink
On 6 mrt 2009, at 00:03, Achim Schneider wrote: Eelco Lempsink ee...@lempsink.nl wrote: The poll won't be public, but every subscriber to Haskell-Cafe will get a (private) voting ballot by email. What about us gmane users? Good point! All of you can send me your email address (directly,

[Haskell-cafe] Re: [reactive] FRP + physics / status of hpysics

2009-03-06 Thread jean-christophe mincke
Hello Peter, The backtraking in time to solve the collision problem you mentionned is not, in my opinion, efficient. From a previous life as an aerospace engineer, I remember that two other solutions exist to handle contact or collision constraints, at least if 2nd order diff. equations are used

Re: [Haskell-cafe] do you have to use fix with forkio?

2009-03-06 Thread Andrea Vezzosi
2009/3/6 Daryoush Mehrtash dmehrt...@gmail.com: Two questions: a)   This  chat server implementation doesn't actually close the connection as a real one would need to do.  If you use forever  is there a way to end the loop so as to end the connection? Yes, throw an exception and catch it from

Re: [Haskell-cafe] Hint and Ambiguous Type issue

2009-03-06 Thread Daniel Gorín
I think you can achieve what you want but you need to use the correct types for it. Remember that when you write: getFilterMainStuff :: Deliverable a = FilePath - Interpreter (Path, Filter a) the proper way to read the signature is the caller of getFilterMainStuff is entitled to pick the

[Haskell-cafe] Re: [reactive] FRP + physics / status of hpysics

2009-03-06 Thread Peter Verswyvelen
Thanks for the info. With backtracking I actually meant the computation of the exact collision time, and let (part of the simulation) only go that far, so it's not really back tracking in the physics engine; does that correspond to your 2nd proposal. I just got this from a physics

[Haskell-cafe] Re: FRP + physics / status of hpysics

2009-03-06 Thread Achim Schneider
Peter Verswyvelen bugf...@gmail.com wrote: Integrating hpysics with Grapefruit might be a good topic for the Hackaton, trying to make a simple game (e.g. Pong or Breakout) Be sure to have more than two simultaneously moving collision objects besides paddles in the specs, or it won't get close

[Haskell-cafe] Re: [reactive] FRP + physics / status of hpysics

2009-03-06 Thread jean-christophe mincke
Peter, Backtracking: yes it is the computation of the exact collision time. I gave 2 solutions that can be used in multi-body dynamics, in general (that is, with 2nd order derivatives). I am not a game writing specialist but, if I understand you, I would say that, in a game, we have 1st order

[Haskell-cafe] Re: [reactive] FRP + physics / status of hpysics

2009-03-06 Thread jean-christophe mincke
Sorry, my message was inadvertently sent - hit the wrong key - a gmail feature Peter, Backtracking: yes it is the computation of the exact collision time. I gave 2 solutions that can be used in multi-body dynamics, in general (that is, with 2nd order derivatives). I am not a game writing

[Haskell-cafe] Re: Migration to QuickCheck 2.0

2009-03-06 Thread John Goerzen
John Goerzen wrote: Hi, My google skills must be faulty, because I can't find much stuff on migrating from QuickCheck 1.0 to 2.0. I've got a number of questions: What's the deal with Result and reason being in two different places in QuickCheck with two different definitions? All

[Haskell-cafe] Re: [reactive] FRP + physics / status of hpysics

2009-03-06 Thread Wolfgang Jeltsch
Am Freitag, 6. März 2009 14:34 schrieb Daniel Bünzli: without using recursive signal functions, If this is because there's this limitation in the frp system you use It is. then better fix the system. The system is Grapefruit, by the way. And I’m its developer, by the way. :-) I have to

[Haskell-cafe] Re: [reactive] FRP + physics / status of hpysics

2009-03-06 Thread Wolfgang Jeltsch
Am Freitag, 6. März 2009 17:51 schrieb Wolfgang Jeltsch: By the way, the adress of the Grapefruit mailing list is grapefr...@projects.haskell.org, not grapefr...@haskell.org. Oh, this is really strange: I addressed my e-mail to grapefr...@projects.haskell.org but the version arriving at the

Re: [Haskell-cafe] Hint and Ambiguous Type issue

2009-03-06 Thread Joseph Fredette
Thanks so much, I think I understand. This definitely sounds like what I want to do. I guess I've got some learning to do... Thats why I love Haskell so much, every other day it gives me something new to learn. Thanks again, /Joe Daniel Gorín wrote: I think you can achieve what you want

Re: [Haskell-cafe] Re: MPI

2009-03-06 Thread Don Stewart
fft1976: On Wed, Mar 4, 2009 at 5:03 PM, FFT fft1...@gmail.com wrote: Are MPI bindings still the best way of using Haskell on Beowulf clusters? It's my feeling that the bindings stagnated, or are they just very mature? What's the story with distributed memory multiprocessing? Are Haskell

Re: [Haskell-cafe] Re: MPI

2009-03-06 Thread Bryan O'Sullivan
On Thu, Mar 5, 2009 at 10:43 AM, FFT fft1...@gmail.com wrote: Are MPI bindings still the best way of using Haskell on Beowulf clusters? It's my feeling that the bindings stagnated, or are they just very mature? MPI itself hasn't changed in 14 years, so it's not exactly a moving target.

Re: [Haskell-cafe] Re: MPI

2009-03-06 Thread David Leimbach
2009/3/6 Bryan O'Sullivan b...@serpentine.com On Thu, Mar 5, 2009 at 10:43 AM, FFT fft1...@gmail.com wrote: Are MPI bindings still the best way of using Haskell on Beowulf clusters? It's my feeling that the bindings stagnated, or are they just very mature? MPI itself hasn't changed in

Re: [Haskell-cafe] Re: MPI

2009-03-06 Thread Don Stewart
bos: On Thu, Mar 5, 2009 at 10:43 AM, FFT fft1...@gmail.com wrote: Are MPI bindings still the best way of using Haskell on Beowulf clusters? It's my feeling that the bindings stagnated, or are they just very mature? MPI itself hasn't changed in 14 years, so it's not

Re: [Haskell-cafe] do you have to use fix with forkio?

2009-03-06 Thread Luke Palmer
On Fri, Mar 6, 2009 at 1:48 AM, Daryoush Mehrtash dmehrt...@gmail.comwrote: Question: Do I need to worry about space leak if I am using the fix to instead of the let? If you need to worry about a space leak with fix, you need to worry about it with let. The reason arrows can tie the loop

Re: [Haskell-cafe] FRP + physics / status of hpysics

2009-03-06 Thread Roman Cheplyaka
* Peter Verswyvelen bugf...@gmail.com [2009-03-06 11:17:50+0100] Regarding hpysics, did anybody did some experiments with this? Nothing I'm aware of. The blog seems to be inactive since december 2008; has development ceased? Sort of. One reason is that DPH does not seem to be ready for

[Haskell-cafe] Looking for a co-founder for a startup using Haskell

2009-03-06 Thread Ed McCaffrey
Hello, I'm turning a project involving music into a startup, and I will be using Haskell for most and possibly all of it. I had an angel investor interested until the market collapse forced him to turn his focus away from new investments. Other investors I have spoken with want me to contact

Re: [Haskell-cafe] Looking for a co-founder for a startup using Haskell

2009-03-06 Thread Paul Johnson
Ed McCaffrey wrote: Other investors I have spoken with want me to contact them again when it is further developed; That means no. See http://blog.guykawasaki.com/2006/01/the_top_ten_lie.html Paul. ___ Haskell-Cafe mailing list

Re: [Haskell-cafe] Re: MPI

2009-03-06 Thread FFT
On Fri, Mar 6, 2009 at 9:30 AM, Don Stewart d...@galois.com wrote: http://haskell.org/haskellwiki/Applications_and_libraries/Concurrency_and_parallelism#Distributed_Haskell These are all Haskell-derived languages, not libraries, right? ___

[Haskell-cafe] Re: [Haskell] string type class

2009-03-06 Thread Duncan Coutts
On Fri, 2009-03-06 at 19:16 +, Chris Kuklewicz wrote: Matthew Pocock wrote: It seems every time I look at hackage there is yet another stringy datatype. For lots of apps, the particular stringy datatype you use matters for performance but not algorithmic reasons. Perhaps this is a

Re: [Haskell-cafe] Data.Binary stack overflow with Data.Sequence String

2009-03-06 Thread Gwern Branwen
On Thu, Mar 5, 2009 at 6:51 AM, Neil Mitchell ndmitch...@gmail.com wrote: Hi Gwern, I get String/Data.Binary issues too. My suggestion would be to change your strings to ByteString's, serisalise, and then do the reverse conversion when reading. Interestingly, a String and a ByteString have

Re: [Haskell-cafe] Data.Binary stack overflow with Data.Sequence String

2009-03-06 Thread Gwern Branwen
On Thu, Mar 5, 2009 at 2:55 PM, Neil Mitchell ndmitch...@gmail.com wrote: Avoid massive reductions in runtime while maintaining the same API? I did move to using ByteString's internally for those bits later on, but reading String's from Data.Binary with a ByteString+unpack went much more

Re: [Haskell-cafe] Test if a file is empty or stat in haskell

2009-03-06 Thread Anish Muttreja
On Thu, Mar 05, 2009 at 03:43:22PM -0500, Thomas DuBuisson wrote: getFileStatus, fileSize ... Great, thanks. BTW, Hoogle does not seem to  know about System.Posix.Files, though it did point me to System.IO.FileSize which would also have served the purpose. Yep, this was discussed in

[Haskell-cafe] Type question re: map

2009-03-06 Thread R J
Given the following (usual) definition of map: map:: (a - b) - [a] - [b] map f [] = [] map f (x : xs) = f x : map f xs What's the type of map map? GHCi's :t command reveals: *Main :t map map map map :: [a - b] - [[a] - [b]] I'd be grateful if

Re: [Haskell-cafe] Type question re: map

2009-03-06 Thread Luke Palmer
2009/3/6 R J rj248...@hotmail.com Given the following (usual) definition of map: map:: (a - b) - [a] - [b] What's the type of map map? The definition is irrelevant, so I removed it. To make it easier to reason about, I'm going to rename the second map to map'. It

Re: [Haskell-cafe] Type question re: map

2009-03-06 Thread sam lee
map :: (a - b) - [a] - [b] map takes a function and transforms a list of a's to b's. map succ [1,2,3] == [succ 1, succ 2, succ 3] == [2, 3, 4] In general, map f :: [a] - [b] where a is domain-type of f and b is image-type of f (f :: a - b). map map [x, y, z] == [map x, map y, map z] so, x,y,z

Re: [Haskell-cafe] Re: Interesting problem from Bird (4.2.13)

2009-03-06 Thread wren ng thornton
Gleb Alexeyev wrote: Here's my attempt though it's not really different from using built-in lists: viewCL CatNil = Nothing viewCL (Wrap a) = Just (a, CatNil) viewCL (Cat a b) = case viewCL a of Nothing - viewCL b Just (x, xs) - Just (x, Cat xs b) My