Re: [Haskell-cafe] Functional programming for processing of large raster images

2006-06-23 Thread minh thu
2006/6/23, [EMAIL PROTECTED] [EMAIL PROTECTED]: G'day all. hey, Quoting [EMAIL PROTECTED]: Recently Vo Minh Thu wondered if Haskell (or, I generalize, functional programming) can be of much use for computer graphics programming. As others have pointed out, it's Haskell (and its laziness)

Re: [Haskell-cafe] Functional progr., images, laziness and all therest

2006-06-23 Thread Ketil Malde
Brian Hulley [EMAIL PROTECTED] writes: But how does this change the fact that y still has 1 more element than yq? yq is after all, not a circular list. infinity+1 = infinity Surely this is just a mathematical convention, not reality! :-) Not even that. Infinity isn't a number, and it

Re: [Haskell-cafe] Functional progr., images, laziness and alltherest

2006-06-23 Thread Chris Kuklewicz
Brian Hulley wrote: Piotr Kalinowski wrote: On 22/06/06, Brian Hulley [EMAIL PROTECTED] wrote: For example, why do people accept that infinity == infinity + 1 ? Surely this expression is just ill-typed. infinity can't be a number. This equation is just a shortcut, so I can't see how can it

[Haskell-cafe] ReadP and MonadFix

2006-06-23 Thread Gracjan Polak
Hi all, A question for hot summer day: Text.ParserCombinators.ReadP.ReadP is an instance of Monad. Could it be an instance of MonadFix too? I'm not that sharp in Haskell to write it myself, but it seems I could make use of such a beast. :) Anybody willing to share? This will also present the

[Haskell-cafe] Scoped data declarations

2006-06-23 Thread Christophe Poucet
Dear,Yesterday, while discussing with Cale and SamB on I suddenly came up with the crazy idea of scoped data declarations. After some brief discussion to check the validity, I finally came to the conclusion that they should be feasible. In addition, I don't think that they would require a high

[Haskell-cafe] Re: Functional progr., infinity, and the Universe

2006-06-23 Thread Jerzy Karczmarczuk
Paul Hudak wrote: Actually Brian's intuition is right on target. One way to define an infinite list is as the limit of an infinite chain of partial lists (which, in domain theory, is essentially how all elements are defined). as the answer to Brian Hulley conjecture criticized by myself:

[Haskell-cafe] sortBy2 for List library

2006-06-23 Thread Serge D. Mechveliani
Consider the following suggestions for the standard Haskell library `List'. import List (intersprerse, insertBy) compose :: [a - a] - a - a -- just appropriate name compose = foldr (.) id insertBy2 :: (a - b) -

Re: [Haskell-cafe] Re: Functional progr., infinity, and the Universe

2006-06-23 Thread Paul Hudak
Jerzy Karczmarczuk wrote: OK, I think that this subject matured enough to rest in peace... I would have to agree with that, although... Couldn't an infinite list just be regarded as the maximum element of the (infinite) set of all finite lists? Perhaps his intuition is right, but there are

Re: [Haskell-cafe] Re: Functional progr., infinity, and the Universe

2006-06-23 Thread Bill Wood
On Fri, 2006-06-23 at 09:38 -0400, Paul Hudak wrote: . . . But the limit of a chain IS the maximal element of the set of all elements comprising the chain, since the LUB, in the case of a chain, is unique, and thus we don't have to worry about choosing the least element (i.e. it reduces

Re: [Haskell-cafe] Re: Functional progr., infinity, and the Universe

2006-06-23 Thread voigt . 16734551
--- [EMAIL PROTECTED] wrote: Jerzy Karczmarczuk wrote: OK, I think that this subject matured enough to rest in peace... I would have to agree with that, although... Since the subject is not going to rest, why not also jump in? Well, each partial list is finite. I think quite a few

Re: [Haskell-cafe] Re: Functional progr., infinity, and the Universe

2006-06-23 Thread Paul Hudak
Bill Wood wrote: On Fri, 2006-06-23 at 09:38 -0400, Paul Hudak wrote: But the limit of a chain IS the maximal element of the set of all elements comprising the chain, since the LUB, in the case of a chain, is unique, and thus we don't have to worry about choosing the least element (i.e. it

Re: [Haskell-cafe] Re: Functional progr., infinity, and the Universe

2006-06-23 Thread Paul Hudak
[EMAIL PROTECTED] wrote: Well, each partial list is finite. I think quite a few people would agree that a finite list is one ending in []. So 1:_|_ is a partial list, but not a finite one. 1:[] is a finite list. 1:_|_ is certainly finite. In what sense is it not? That doesn't quite make

Re: [Haskell-cafe] Re: Functional progr., infinity, and the Universe

2006-06-23 Thread voigt . 16734551
--- [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] wrote: 1:_|_ is certainly finite. In what sense is it not? I see that point. I have been using finite as, by convention, equal to total and finite. And so have others. As always with convention, one can argue. I won't, of course. Sorry, see my

Re: [Haskell-cafe] Functional progr., images, laziness and all therest

2006-06-23 Thread Ross Paterson
On Thu, Jun 22, 2006 at 05:44:58PM +0100, I wrote: It works because Haskell 'data' definitions yield both an initial fixed point (with respect to strict functions) and a terminal fixed point (with respect to arbitrary functions), and moreover these are usually the same. The former is

Re: [Haskell-cafe] Re: Functional progr., infinity, and the Universe

2006-06-23 Thread Stepan Golosunov
On Fri, Jun 23, 2006 at 10:57:48AM -0400, Paul Hudak wrote: [EMAIL PROTECTED] wrote: Well, each partial list is finite. I think quite a few people would agree that a finite list is one ending in []. So 1:_|_ is a partial list, but not a finite one. 1:[] is a finite list. 1:_|_ is

Re: [Haskell-cafe] Re: Functional progr., infinity, and the Universe

2006-06-23 Thread Stefan Holdermans
Stepan, And what is length _|_ ? _|_ Regards, Stefan ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Re: Functional progr., infinity, and the Universe

2006-06-23 Thread Paul Hudak
Stepan Golosunov wrote: On Fri, Jun 23, 2006 at 10:57:48AM -0400, Paul Hudak wrote: [EMAIL PROTECTED] wrote: I think quite a few people would agree that a finite list is one ending in []. So 1:_|_ is a partial list, but not a finite one. 1:[] is a finite list. 1:_|_ is certainly finite. In

[Haskell-cafe] parsec, how to feed single tokens?

2006-06-23 Thread Marc Weber
Hi. I want to write a haskellquickfind app to get a list of files using human readable hash values (eg the first character of directory/filenames) Eg hquickfind vtl should print /var/tmp/local My implementation should look like this: Every folder/file is token and I want to run a parser. to

Re: [Haskell-cafe] Lambda abstraction analogous to imperative pseudo-code?

2006-06-23 Thread Jason Dagit
On 6/10/06, Robert Dockins [EMAIL PROTECTED] wrote: On Saturday 10 June 2006 04:35 pm, Clifford Beshers wrote: The Wikipedia article on lambda abstractions (http://en.wikipedia.org/wiki/Lambda_abstraction) has a statement that does not resonate with me: A lambda abstraction is to a

Re: [Haskell-cafe] ReadP and MonadFix

2006-06-23 Thread Levent Erkok
Gracjan:To declare ReadP an instance of MonadFix; you'll first have to make the P monad into a MonadFix instance. That can be done using existing techniques in the literature.ReadP is essentially the continuation monad transformer wrapped around P. It's well known in the value-recursion literature

Re: [Haskell-cafe] Re: Functional progr., infinity, and the Universe

2006-06-23 Thread Stepan Golosunov
On Fri, Jun 23, 2006 at 03:30:18PM -0400, Paul Hudak wrote: Stepan Golosunov wrote: On Fri, Jun 23, 2006 at 10:57:48AM -0400, Paul Hudak wrote: [EMAIL PROTECTED] wrote: I think quite a few people would agree that a finite list is one ending in []. So 1:_|_ is a partial list, but not a

[Haskell-cafe] newbie - IO issues (of course)

2006-06-23 Thread Geoffrey King
I have been work my way through Haskell The Craft of Functional Programming, all was fine until IO (chapter 18). That is causing me bafflement. I am trying to write a totally trivial program that reads a series of integers from the console until it gets a zero, then returns the series of

Re: [Haskell-cafe] newbie - IO issues (of course)

2006-06-23 Thread Jason Dagit
On 6/23/06, Geoffrey King [EMAIL PROTECTED] wrote: I have been work my way through Haskell The Craft of Functional Programming, all was fine until IO (chapter 18). That is causing me bafflement. I am trying to write a totally trivial program that reads a series of integers from the console