[Haskell-cafe] Postdoctoral Research Position at Yale University

2009-02-17 Thread Paul Hudak
concepts and implementation techniques, as well as networking fundamentals. A PhD in computer science or related field is required. Yale is an affirmative action, equal opportunity employer. Interested candidates should send their CV or resume to Professor Paul Hudak at paul.hu...@yale.edu

Re: [Haskell] on starting Haskell-Edu, a new education-related Haskell-related mailing list

2008-07-08 Thread Paul Hudak
/Mailing_lists -Paul Hudak ___ Haskell mailing list Haskell@haskell.org http://www.haskell.org/mailman/listinfo/haskell

Re: [Haskell-cafe] anybody can tell me the pronuncation of haskell?

2008-01-29 Thread Paul Hudak
Well, Haskell was Curry's first name, so perhaps we should use "Moses", which was Schönfinkel's first name, and has some nice biblical metaphors :-)     -Paul [EMAIL PROTECTED] wrote: Tim Chevalier(*) writes: I think to ease the acceptance of Haskell in the broader world, we should

Re: [Haskell-cafe] New to Haskell

2007-12-18 Thread Paul Hudak
If the semantics of a language says that a function f is equivalent to a function g, but there is a function h such that h(f) is not equivalent to h(g), then h cannot be a function. Therefore that language cannot be a (purely) functional language. That is the pure and simple reason why

Re: [Haskell-cafe] New to Haskell

2007-12-18 Thread Paul Hudak
Benja Fallenstein wrote: Not so fast :-) Caveat one, there may be useful ways to for functions to implement Show that don't conflict with extensionality (i.e., the property that two functions are equal if they yield the same results for all inputs). Sure, and I suppose one way to do this

Re: [Haskell-cafe] New to Haskell

2007-12-18 Thread Paul Hudak
Benja Fallenstein wrote: I mean, I reject the answer "They wanted it this way" because I think the answer should be, "They wanted it this way because They looked at substituting equals under a lambda, and They saw it was good" ;-) Your version of the answer is in fact correct, but is

Re: [Haskell-cafe] Yampa / AFRPVectorSpace.hs

2007-12-17 Thread Paul Hudak
Certainly looks like a typo to me! Peter Verswyvelen wrote: While studying the vector space class in AFRP, I encountered the following strange code: class Floating a = VectorSpace v a | v - a where ... v1 ^-^ v2 = v1 ^+^ v1 -- (negateVector v2) I have no idea why the (negateVector v2)

[Haskell] [Fwd: PADL'08: Call for Participation (Early Reg. Deadline: Dec 13)]

2007-12-06 Thread Paul Hudak
___ Haskell mailing list Haskell@haskell.org http://www.haskell.org/mailman/listinfo/haskell

[Haskell] Re: PADL'08: Call for Participation (Early Reg. Deadline: Dec 13)

2007-12-06 Thread Paul Hudak
: General Chair: Hai-Feng Guo Program Chair: Paul Hudak David Warren ___ Haskell mailing list Haskell@haskell.org http://www.haskell.org/mailman/listinfo/haskell

Re: [Haskell-cafe] Semantics of uniqueness types for IO (Was: Why can't Haskell be faster?)

2007-11-01 Thread Paul Hudak
One can certainly use an operational semantics such as bisimulation, but you don't have to abandon denotational semantics. The trick is to make output part of the "final answer". For a conventional imperative language one could define, for example, a (lifted, recursive) domain: Answer =

Re: [Haskell-cafe] Haskell libraries for computer vision

2007-10-16 Thread Paul Hudak
Henning Thielemann wrote: On Mon, 15 Oct 2007, Don Stewart wrote: http://alberrto.googlepages.com/easyvision An experimental Haskell system for fast prototyping of computer vision and image processing applications. Looks ridiculously cool. Image processing with Haskell -

Re: [Haskell-cafe] Troubles understanding memoization in SOE

2007-09-26 Thread Paul Hudak
Henning Thielemann wrote: On Wed, 26 Sep 2007, Peter Verswyvelen wrote: I hope I won't come to the conclusion that after one year learning the cool lazy functional programming language Haskell (which I want to use for making simple videogames in a clean way for teaching), I haven't tested it,

Re: [Haskell-cafe] Troubles understanding memoization in SOE

2007-09-25 Thread Paul Hudak
Peter Verswyvelen wrote: I thought the lambda function that memo1 returns would be called over and over again, and instead of reevaluating the stream from the beginning, it would just return the stream since it is in the cache, but actually it just gets called twice in recursive situations:

Re: [Haskell-cafe] Troubles understanding memoization in SOE

2007-09-24 Thread Paul Hudak
, but in a subtle way that we only recently realized. The paper that Paul cited (http://www.cs.yale.edu/~hl293/download/leak.pdf) describes this in detail. I hope this helps, -Paul Hudak Peter Verswyvelen wrote: Hi, in SOE, the following memoization function is implemented: memo1 :: (a-b

Re: [Haskell-cafe] let and fixed point operator

2007-08-31 Thread Paul Hudak
ok wrote: What is so bad about f x = g x'' where x'' = x' + transform x' = x * scale (if you really hate inventing temporary names, that is). There's nothing at all wrong with this, assuming it's what you meant to type :-), and it might even correspond perfectly to the

Re: [Haskell-cafe] let and fixed point operator

2007-08-30 Thread Paul Hudak
Andrew Coppin wrote: OK, so it's only tangentally related, but... do you have *any idea* how many times I've written something like let x = (some complex function of x) in (some other complex function of x) when in fact what I *meant* to do was type x' instead of x?! I try not to use

Re: [Haskell-cafe] Explaining monads

2007-08-15 Thread Paul Hudak
I've seen the analogy with recipes used before, but I think that you need to be careful when you try to distinguish the analogy to monads from the analogy to functions. The reason is that, in the one-of-many ways that I view monads, a monad is just a high-order /function /that abstracts away

[Haskell] [Fwd: PADL 2008: Call for Papers]

2007-08-06 Thread Paul Hudak
of presentation. The program committee may choose not to make an award, or to make multiple awards. Contacts: For information about papers and submissions, please contact the Program Chair: Paul Hudak PC co-Chair - PADL 2008 Department of Computer Science

[Haskell-cafe] [Fwd: PADL 2008: Call for Papers]

2007-08-06 Thread Paul Hudak
of presentation. The program committee may choose not to make an award, or to make multiple awards. Contacts: For information about papers and submissions, please contact the Program Chair: Paul Hudak PC co-Chair - PADL 2008 Department of Computer Science

Re: [Haskell-cafe] Equational Reasoning goes wrong

2007-07-22 Thread Paul Hudak
Note that you can take any closed term e and do the following equational reasoning: e == let x = e in x == let x = x in x == _|_ Technically, though, this is not wrong, in that it is still consistent, where consistency is defined using the usual information ordering on domains. Conventional

Re: [Haskell-cafe] Re: historical question about Haskell and Haskell Curry

2007-07-19 Thread Paul Hudak
Jon Fairbairn wrote: If not, why isn't Haskell called "Alonzo"? ;-) I think that was one of the suggestions made among many others. Haskell has the advantage of sounding less like a person's name (which might have been why Curry didn't like it) Actually, the more

Re: [Haskell-cafe] Parsers are monadic?

2007-07-01 Thread Paul Hudak
Hi Claus. I am sympathetic with your comments regarding monads and continuations. It's interesting to note that the original I/O system in Haskell was based on streams and continuations. The continuation version had two continuations in fact -- one for success and one for failure. For

Re: [Haskell-cafe] HGL on Windows

2007-06-29 Thread Paul Hudak
Unfortunately your memory serves you well -- see: http://hackage.haskell.org/trac/ghc/ticket/742 -Paul peterv wrote: I vaguely remember to have read that HGL is (currently) not supported on Windows, but I cant find this information any more. Is this correct? It seems

Re: [Haskell-cafe] New New newbie question/help

2007-06-27 Thread Paul Hudak
I think that an easier solution is to just change the type of equilateralTri to: equilateralTri :: Window - Float - Float - Float - IO() But I am on the road and wasn't able to actually run the code. -Paul Dougal Stanton wrote: On 27/06/07, Balu Raman [EMAIL PROTECTED] wrote:

Re: [Haskell-cafe] New New newbie question/help

2007-06-27 Thread Paul Hudak
Hi Balu. It looks like you've gotten some excellent advice from others, but permit me to add a further comment regarding the broader context, now that I've had a chance to look a little closer. It looks like you're trying to solve the "fractal snowflake" exercise. One of the challenges in

Re: [Haskell-cafe] Just curios

2007-06-11 Thread Paul Hudak
As reported in the recent HOPL paper, A History of Haskell, Haskell Brooks Curry actually didn't like his first name! I learned this when I visited his wife, Virginia Curry, at the time when we decided to name a language after her husband. By the way, Haskell Curry's mother's name was Anna

Re: [Haskell-cafe] What puts False before True?

2007-05-31 Thread Paul Hudak
PR Stanley wrote: I think so, too. In Boolean algebra (which predates computers, much less C), FALSE has traditionally been associated with 0, and TRUE with 1. And since 1 0, TRUE FALSE. The question, however, still remains: why False = 0 and True 1? I appreciate that it's so in boolean

Re: [Haskell-cafe] Monad pronounced like gonad?

2007-05-10 Thread Paul Hudak
This reminds me of a joke (which depends on recognizing a connection between monads, continuations, control, and goto statements): Q: What do you get when you cross a monad with a continuation? A: A gonad. (I am sure I will hear the groans right through the ethernet! :-) -Paul Tom Harper

Re: [Haskell-cafe] Josephus problem and style

2007-04-01 Thread Paul Hudak
Here's a solution that I think is a bit more elegant. -Paul josephus n k = let loop xs = let d:r = drop (k-1) xs in d : loop (filter (/= d) r) in take n (loop (cycle [1..n])) Anthony Chaumas-Pellet wrote: Hello, I've written a function to compute the general

[Haskell] NYTimes.com: John W. Backus, 82, Fortran Developer, Dies

2007-03-20 Thread paul . hudak
This page was sent to you by: [EMAIL PROTECTED] John Backus, inventor of Fortran, Turing Award winner, and also an early pioneer in functional programming, died Saturday at his home in Oregon. Many of us have fond memories of him in the earlier days of our careers, and we all owe a lot to him

[Haskell-cafe] NYTimes.com: John W. Backus, 82, Fortran Developer, Dies

2007-03-20 Thread paul . hudak
This page was sent to you by: [EMAIL PROTECTED] John Backus, inventor of Fortran, Turing Award winner, and also an early pioneer in functional programming, died Saturday at his home in Oregon. Many of us have fond memories of him in the earlier days of our careers, and we all owe a lot to him

Re: [Haskell-cafe] Re: fix

2007-03-20 Thread Paul Hudak
Assuming 1 :: Int, then: ones = 1 : ones is equivalent to: ones = fix (\ones - 1:ones) where fix has type ([Int] - [Int]) - [Int]. It's also the case that: inf = 1+inf is equivalent to: inf = fix (\inf - 1+inf) where fix has type (Int - Int) - Int. Unfortunately (perhaps), the fixed point

Re: [Haskell-cafe] Origins of (x:xs)?

2006-12-19 Thread Paul Hudak
Pattern matching goes back to Burstall and Darlington's work in the 1970's. As for x:xs, the xs is meant to be the plural of x, and is pronounced exs (I guess...). Similarly, n:ns is one n followed by many more ens. Make sense? (By the way, : is often pronounced followed by.) -Paul

[Haskell] haskell.org memory upgrade

2006-12-14 Thread Paul Hudak
Dear Haskellers -- Haskell.org will go down today at 1500 EST for about 10 minutes for a memory upgrade. Sorry for the inconvenience, -Paul Hudak ___ Haskell mailing list Haskell@haskell.org http://www.haskell.org/mailman/listinfo/haskell

[Haskell-cafe] haskell.org memory upgrade

2006-12-14 Thread Paul Hudak
Dear Haskellers -- Haskell.org will go down today at 1500 EST for about 10 minutes for a memory upgrade. Sorry for the inconvenience, -Paul Hudak ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo

Re: [Haskell-cafe] Writing Haskell For Dummies Or At Least For People Who Feel Like Dummies When They See The Word 'Monad'

2006-12-11 Thread Paul Hudak
ith both elementary and advanced applications. I hope that some of you are up for the challenge! -Paul Hudak Sebastian Sylvan wrote: On 12/11/06, Kirsten Chevalier [EMAIL PROTECTED] wrote: It's not as if this is the first time that this has been suggested, but some people have sugg

Re: [Haskell-cafe] Functional GUI combinators for arbitrary graphs ofcomponents?

2006-12-02 Thread Paul Hudak
If you consider just Dags, I believe that this question is equivalent to asking what set of combinators will allow you to create an arbitrary composition of functions that allow sharing inputs and returning multiple results. And I think that one answer to that is the set of combinators that

Re: [Haskell-cafe] Self Study with SOE

2006-10-28 Thread Paul Hudak
Hi Deech. I'm afraid that there is no solutions manual for SOE. I have many of the solutions scattered about in various places, and have been meaning to cull them together, but haven't had the time. However, the following website should be helpful to you:

Re: [Haskell-cafe] Re: optimization help

2006-10-15 Thread Paul Hudak
[EMAIL PROTECTED] wrote: Paul Hudak wrote: In fact avoiding space leaks was one of the motivations for our moving to an arrow framework for FRP (now called Yampa). Arrows amount to a point-free coding style, although with "arrow syntax" the cumbersomeness of p

Re: [Haskell-cafe] Re: optimization help

2006-10-13 Thread Paul Hudak
In fact avoiding space leaks was one of the motivations for our moving to an arrow framework for FRP (now called Yampa). Arrows amount to a point-free coding style, although with arrow syntax the cumbersomeness of programming in that style is largely alleviated. -Paul jeff p wrote:

Re: [Haskell] GADT: call for proper terminology

2006-10-11 Thread Paul Hudak
Lennart Augustsson wrote: Well, I think the GADT type definition syntax is the syntax data type definitions should have had from the start. Too bad we didn't realize it 15 years ago. -- Lennart I agree! In my experience teaching Haskell, the current syntax is a bit confusing for

Re: [Haskell] ANN: Efficient, dynamically compiled, lazy functional semantics on JVM, having tight integration with the Java language

2006-09-28 Thread Paul Hudak
Title: Re: [Haskell] ANN: Efficient, dynamically compiled, lazy functional semantics on JVM, having tight integration with the Java language I suspect many of us are dying to ask: Why not just use Haskell? -Paul Luke Evans wrote: It could be for a subset of Haskell (probably a large

Re: [Haskell-cafe] Haskell.org down

2006-09-26 Thread Paul Hudak
hung. My first assumption is abuse by web crawlers. I have denied access to all web crawlers at the moment while I continue looking further into this and the load is staying low. I'll keep you posted. Paul Hudak wrote: We are looking into it. Sorry for the inconvenience. -Paul Jason

Re: [Haskell-cafe] Haskell.org down

2006-09-26 Thread Paul Hudak
We are looking into it. Sorry for the inconvenience. -Paul Jason Dagit wrote: On 9/23/06, Donald Bruce Stewart [EMAIL PROTECTED] wrote: Hmm. Looks like its gone down again? And again... Seems fishy... Very. Professor Paul Hudak Department of Computer ScienceOffice: (203) 432

Re: [Haskell-cafe] Haskell.org down

2006-09-23 Thread Paul Hudak
Thanks Don. I alerted our IT staff this morning, and they seem to have things working again, although here is their final response: The web server had over 150 client connections which exceeded its limit. I restarted the web server and all is well. I'll keep and eye on it and see if

Re: [Haskell-cafe] Haskore

2006-09-22 Thread Paul Hudak
As Henning points out, the darcs version of Haskore is now the standard, which Henning has been kind enough to set up. However, it has also been extended and re-organized, and at least currently does not have the simplistic feel of the original Haskore. On the other hand, the version that is

Re: [Haskell-cafe] Haskore microtonal support

2006-09-22 Thread Paul Hudak
An easier and better way to support microtonal music in Haskore is to use the csound back-end instead of MIDI. I'd be happy to help someone develop such a thing if interested. -Paul Magnus Jonsson wrote: On Thu, 14 Sep 2006, Henning Thielemann wrote: On Thu, 14 Sep 2006, Magnus

Re: [Haskell-cafe] Fran - Functional Reactive Animation

2006-08-24 Thread Paul Hudak
Actually Pan (and Pan#) are NOT the same as Fran -- quite a bit different, in fact. You may have to email Conal Elliott for a working version of Fran, OR you could look at my simplified version (which I call FAL, for Functional Animation Language) described in Chapter 15 of my textbook, The

Re: [Haskell-cafe] Why shouldn't variable names be capitalized?

2006-08-04 Thread Paul Hudak
Ok, you asked for it, so here's my worst :-) 1) Here's what the History of Haskell has to say about this: Namespaces were a point of considerable discussion in the Haskell Committee. We wanted the user to have as much freedom as possible, while avoiding any form of ambiguity. So we

Re: [Haskell-cafe] if-then-else as rebindable syntax (was Re: Why does Haskell have the if-then-else syntax?)

2006-07-27 Thread Paul Hudak
I'm all for making Haskell easy for beginners, but as Simon points out, this change shouldn't really affect them. Since I'm also a fan of using Haskell as the host for embedded DSL's, I think this would be a good addition, since it provides more flexibility with the syntax. -Paul Simon

Re: [Haskell-cafe] Why does Haskell have the if-then-else syntax?

2006-07-26 Thread Paul Hudak
Mike Gunter wrote: I had hoped the History of Haskell paper would answer a question I've pondered for some time: why does Haskell have the if-then-else syntax? The paper doesn't address this. What's the story? thanks, -m Thanks for asking about this -- it probably should be in the paper.

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

2006-06-24 Thread Paul Hudak
Stepan Golosunov wrote: 1:_|_ is certainly finite. And what is length _|_ ? _|_, of course!! :-) The point being, length is well-defined only for total lists; it is undefined for partial lists. But this doesn't mean that a partial list isn't finite. What is finite list then? Is ones =

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 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

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 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

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

2006-06-22 Thread Paul Hudak
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). A chain is a sequence a1 = a2 = ... = an, where = is the domain ordering. A partial

Re: [Haskell-cafe] The values of infinite lists

2006-05-25 Thread Paul Hudak
at the time of about Haskell 1.2, and I agree: that appendix was useful for understanding Haskell's i/o story at the time (request/response streams, if I recall correctly; before monads;-). cheers, claus -- Professor Paul Hudak Department of Computer ScienceOffice: (203) 432-1235 Yale

Re: [Haskell-cafe] The values of infinite lists

2006-05-24 Thread Paul Hudak
Points well taken Claus. See further comments below. Claus Reinke wrote: Hi Paul, I think that you're asking for a semantics of the entire OS, i.e. the entire outside world, and for that I agree that something other than equational reasoning is needed to reason about it. I was about to

Re: [Haskell-cafe] The values of infinite lists

2006-05-24 Thread Paul Hudak
Brian Hulley wrote: Paul Hudak wrote: ... My main point it that if we're reasoning about a single Haskell program (with no impure features), then the entire world, with all its non-determinism internal to it, can be modelled as a black box -- i.e. a function -- that interacts with the single

Re: [Haskell-cafe] The values of infinite lists

2006-05-23 Thread Paul Hudak
extensions cannot be modelled as pure functions, then I would agree that a process calculus (say) would be the right way to go. But as far as i know, Haskell doesn't have such features. -Paul Claus Reinke wrote: Paul Hudak wrote: As an author of such a book, I'm not willing to do

Re: [Haskell-cafe] The values of infinite lists

2006-05-23 Thread Paul Hudak
Robert Dockins wrote: On May 23, 2006, at 9:50 AM, Paul Hudak wrote: If you disagree, then please tell me which features in Haskell (a particular I/O command, perhaps?) cannot be modelled as a function. IO.hGetContents? I suspect the result of using hGetContents on a file you have open

Re: [Haskell-cafe] map and list comprehensions

2006-02-06 Thread Paul Hudak
John Peterson wrote: I think the point was that all syntax (like list comprehensions or pattern matching) in Haskell is tied directly to the Prelude. So [ f x ...] is ALWAYS using the Prelude definitions of things while map could be hidden and redefined. Yes, of course. I was implicitly

Re: [Haskell-cafe] Why is $ right associative instead ofleftassociative?

2006-02-05 Thread Paul Hudak
Bulat Ziganshin wrote: LA In my opinion all the special syntactic sugar for lists should go LA away. I don't think lists are special enough to motivate it. i have proposal (not for Haskell', of course) of using : and [] syntax for general notion of traversable collections: Minor point,

Re: [Haskell-cafe] Re: Why is $ right associative instead ofleftassociative?

2006-02-05 Thread Paul Hudak
Ben Rudiak-Gould wrote: Paul Hudak wrote: Minor point, perhaps, but I should mention that : is not special syntax -- it is a perfectly valid infix constructor. But Haskell 98 does treat it specially: you can't import Prelude hiding ((:)), or rebind it locally, or refer to it as Prelude

Re: [Haskell-cafe] Re: Why is $ right associative insteadofleftassociative?

2006-02-05 Thread Paul Hudak
Chris Kuklewicz wrote: Brian Hulley wrote: Ben Rudiak-Gould wrote: ... but no more confusing than the fact that [f x | x - xs] is not the same as (map f xs). Can you explain why? On page 258 of Paul Hudak's book The Haskell School of Expression he states that do x- xs; return (f x) is

Re: [Haskell-cafe] Why is $ right associative instead of leftassociative?

2006-02-04 Thread Paul Hudak
Actually, one of the main reasons that we chose (:) is that that's what Miranda used. So, at the time at least, it was not entirely clear what the de facto universal inter-language standard was. In any case, I agree with Stefan regarding Haskell Prime! -Paul Stefan Holdermans wrote:

Re: [Haskell-cafe] Detecting Cycles in Datastructures

2005-12-11 Thread Paul Hudak
Another belated reply to an old thread... Andrew Pimlott wrote: On Fri, Nov 18, 2005, Paul Hudak wrote: 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 discussion started around

Re: [Haskell-cafe] Hacking Haskell in Nightclubs?

2005-11-29 Thread Paul Hudak
I suspect it would be pretty easy to build a SuperCollider backend for Haskore. -Paul Regards, Rohan On Mon Nov 28 21:35:38 EST 2005 Paul Hudak wrote: Although Haskore (haskell.org/haskore) doesn't currently support real-time music, it's something I've thought about numerous times

Re: [Haskell-cafe] Hacking Haskell in Nightclubs?

2005-11-28 Thread Paul Hudak
Although Haskore (haskell.org/haskore) doesn't currently support real-time music, it's something I've thought about numerous times in the past, and wish I had the time to do it... -Paul Hudak Echo Nolan wrote: Hello all, I read an article on using perl for live improvised

Re: [Haskell-cafe] Detecting Cycles in Datastructures

2005-11-18 Thread Paul Hudak
This is a very late response to an old thread... Tom Hawkins wrote: In a pure language, is it possible to detect cycles in recursive data structures? For example, is it possible to determine that cyclic has a loop? ... data Expr = Constant Int | Addition Expr Expr cyclic :: Expr cyclic

Re: [Haskell-cafe] Detecting Cycles in Datastructures

2005-11-18 Thread Paul Hudak
Henning Thielemann wrote: On Fri, 18 Nov 2005, Paul Hudak wrote: For example: fe1,fe2 :: Fix Expr fe1 e = Add (Const 1) (Const 1) -- non-recursive fe2 e = Add (Const 1) e -- recursive Do you mean fe1 _ = Add (Const 1) Loop ? No, I really meant it as written. I included

Re: [Haskell-cafe] Detecting Cycles in Datastructures

2005-11-18 Thread Paul Hudak
Greg Woodhouse wrote: --- Paul Hudak [EMAIL PROTECTED] wrote: Tom Hawkins wrote: In a pure language, is it possible to detect cycles in recursive data structures? For example, is it possible to determine that cyclic has a loop? ... data Expr = Constant Int | Addition Expr Expr

Re: [Haskell-cafe] Detecting Cycles in Datastructures

2005-11-18 Thread Paul Hudak
Greg Woodhouse wrote: --- Paul Hudak [EMAIL PROTECTED] wrote: Y (\ones. cons 1 ones) where Y (aka the paradoxical combinator or fixed point combinator) is defined as: \f. (\x. f (x x)) (\x. f (x x)) Now, this is I have seen, but it frankly strikes me as a formal trick. I've never felt

Re: [Haskell-cafe] Infinite lists and lambda calculus

2005-11-18 Thread Paul Hudak
Cale Gibbard wrote: Y = (\f. (\x. f (x x)) (\x. f (x x))) In a sense, the real definition of Y is Y f = f (Y f), this lambda term just happens to have that property, but such functions aren't rare. Actually no, the real definition is the top one, because the other one isn't even a valid

Re: [Haskell] A Gentle Introduction to Haskell Version 98

2005-09-14 Thread Paul Hudak
, with Hudak/Fasel/Peterson as authors. I really don't know much about the HTML version, except that it's handy to have on-line :-) -Paul Hudak Wolfgang Jeltsch wrote: Hello, the web page under http://haskell.org/tutorial/ says: This is the master HTML version of the Gentle Introduction

Re: [Haskell] how to cite the (revised) Haskell Report

2005-09-14 Thread Paul Hudak
/listinfo/haskell -- Professor Paul Hudak Department of Computer ScienceOffice: (203) 432-1235 Yale University FAX:(203) 432-0593 P.O. Box 208285 email: [EMAIL PROTECTED] New Haven, CT 06520-8285 WWW:www.cs.yale.edu/~hudak

Re: [Haskell-cafe] a newbie's question

2005-04-21 Thread Paul Hudak
Thomas Davie wrote: On Apr 21, 2005, at 3:47 PM, SCOTT J. wrote: Hi, I'm beginning to study Haskell, For the following a = [1,2,3] b = there do x - a y - b return (x , y) Winhugs cannot run it. Gives Syntax error in input (unexpected backslash ( lambda)) Your problem is that you're using

Re: [Haskell-cafe] RE: Answers to Exercises in Craft of FP

2005-01-28 Thread Paul Hudak
understanding). Thus what I would need are the solutions to those exercises. Regards, Chris ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe -- Professor Paul Hudak Chair, Dept of Computer Science

Re: [Haskell-cafe] What are the MonadPlus laws?

2005-01-25 Thread Paul Hudak
Good point; I suppose the constraint m /= _|_ should be added to the law. [EMAIL PROTECTED] wrote: The problem is this law: m = \k - mzero === mzero I think this law is untrue for _all_ MonadPlus instances, and you can trivially check this by setting m to bottom. Cheers, Andrew Bromage

Re: [Haskell-cafe] Some random newbie questions

2005-01-07 Thread Paul Hudak
Benjamin Pierce wrote: OK, I'm taking the plunge and using Haskell in a course I'm teaching this semester. To get ready, I've been doing quite a bit of Haskell programming myself, and this has raised a few questions... * What are the relative advantages of Hugs and GHC, beyond the obvious (Hugs

Re: [Haskell-cafe] Re: Non-technical Haskell question

2004-12-07 Thread Paul Hudak
Aaron Denney wrote: On 2004-12-06, Gour [EMAIL PROTECTED] wrote: Any idea how to make a (more organize) community effort to bring Haskell out? I'd rather it didn't until a few warts were fixed. OTOH, it may be too late already, barring a Haskell 2. Does Python not have warts? Or Pearl, or Java,

Re: [Haskell-cafe] Newbie Question on type constructors

2004-11-04 Thread Paul Hudak
Sorry, I had to drop out of this thread for a few days... Ben Rudiak-Gould wrote: Paul Hudak wrote: Note that instead of: data Shape = Circle Float | Square Float the Haskell designers might have used the following syntax: data Shape where Circle :: Float - Shape

Re: [Haskell-cafe] Newbie Question on type constructors

2004-11-01 Thread Paul Hudak
: Paul Hudak wrote: Oh, I disagree with this point of view. Circle is certainly a value, i.e. a full-fledged function, as Brian Beckman correctly surmised. Interesting. I don't claim that my viewpoint is the One True Path, but I don't think it's wrong, either. I know you're interested

Re: [Haskell] Question about Infix/Postfix Operators in Haskell

2004-10-18 Thread Paul Hudak
Pedro Vasconcelos wrote: On Mon, 18 Oct 2004 09:51:52 +0200 Georg Martius [EMAIL PROTECTED] wrote: On Mon, 18 Oct 2004 09:43:26 +0200, Peter Theissen [EMAIL PROTECTED] wrote: Hi, is there any possibility of defining Infix-/Postfixoperators in Haskell? Example: Plus :: Int, Int - Int Plus x y = x +

Re: [Haskell-cafe] Re: The State Monad

2004-10-08 Thread Paul Hudak
Sorry to nit-pick, but state monads are NOT syntactic sugar -- they're just an example of good old data/functional abstraction, that also happens to be in the form of a monad. On the other hand, Haskell's do notation -- now THAT'S syntactic sugar :-) -Paul Ben Lippmeier wrote: John Goerzen

Re: [Haskell-cafe] Integrating Haskell into a J2EE environment

2004-10-06 Thread Paul Hudak
, Paul Hudak wrote: I wouldn't write off Haskell so quickly. All of what Shoeb describes concerning DSL issues might be much more easily solved in Haskell, and will certainly be more flexible than a hard-wired approach. The J2EE interface might be ugly, but if the functionality needed is not too

Re: [Haskell-cafe] (no subject)

2004-09-10 Thread Paul Hudak
, animation, and basic control systems such as used in robotics. Also, although most of the developers have dispersed, I believe that most of them are still interested in the ideas, and the [EMAIL PROTECTED] mailing list would probably be responsive if anyone bothered to use it. -Paul Hudak John C

Re: [Haskell-cafe] so how does one convert an IO a into an a ?

2004-07-09 Thread Paul Hudak
Judging from a previous message I'm not sure if you're still using SOE, but one of the things I tried to do is introduce IO without mentioning monads at all, and if you read chapter 3 (especially section 3.1) you will see that that's the case. To those who have had imperative programming

Re: Haskell and sound (was: [Haskell-cafe] Toy application advice wanted)

2004-05-08 Thread Paul Hudak
For what it's worth, SOE and Haskore provide support for reading and writing MIDI files, and for generating both score and orchestra files in csound. But there is no direct support for sound files, nor is there support for real-time MIDI. -Paul Claus Reinke wrote: (SOE's music component

Re: determining if a int is a power

2003-11-08 Thread Paul Hudak
But note that x `seq` x is equivalent to x, even operationally. To see why denotationally, note that if x evaluates to _|_, so does x `seq` x. And if x evaluates to a value v, so does x `seq` x. To see why operationally, consider the two lists: let x = 1+1 in [x `seq` x] let x = 1+1 in

Re: fixed point

2003-10-27 Thread Paul Hudak
Thomas L. Bevan wrote: Is there a simple transformation that can be applied to all recursive functions to render them non-recursive with fix. Suppose you have a LET expression with a set of (possibly mutually recursive) equations such as: let f1 = e1 f2 = e2 ... fn = en in e The

Re: fixed point

2003-10-27 Thread Paul Hudak
Also, had a feeling the fix function was related to the Y combinator; it seems they're the same thing! Yes, they're the same in effect, although historically fix is often defined recursively or taken as a primitive, whereas Y has its roots in the lambda calculus, where it is defined as: Y =

Re: Haskell for non-Haskell's sake

2003-09-01 Thread Paul Hudak
Well, there's PADL (Practical Aspects of Declarative Languages), see http://www.research.avayalabs.com/user/wadler/padl03/. -Paul Tim Docker wrote: Jerzy Karczmarczuk wrote: Presumably this reviewer has his particular visions what a science is, but I don't believe that such people dominate in

Re: [OT] Teaching Haskell in High School

2003-02-06 Thread Paul Hudak
I can't resist jumping in on this one: Haskell just has some terrible properties when it comes to teaching beginners. Among them are the complex and easy-to-get-wrong syntax, the available programming environments which are OK for developers but awful for beginners. There's also a dearth of

Re: representation getting verbose...

2002-10-18 Thread Paul Hudak
In Paul Hudak's SOE, I find a definition of expression: data Expr = C Float | V String | Expr :+ Expr | Expr :- Expr | Expr :* Expr | Expr :/ Expr Now this is compelling, but sometimes, I might want to have a function that takes a variable only, not just any kind of

Re: Depth-First search problems

2002-09-19 Thread Paul Hudak
], i.e. to the list data type. Specifically, CreateStack is [], Push is (:), top is head, and pop is tail. Hope this helps, -Paul Hudak -- Binary Tree structure data BinTree t = EmptyTree | Bin (BinTree t) t (BinTree t) left (Bin b1 _ _) = b1 right (Bin _ _ b2) = b2 value (Bin _ v _) = v

[Fwd: F#]

2002-05-30 Thread Paul Hudak
Hey Simon et al at Micro$oft, when will there be an H#? (Ok, I'll settle for Haskell.NET :-) -Paul ---BeginMessage--- Title: Message Paul, I just saw this, and I think you and I were talking about using ML. Let me know if we need to follow-up on this further. Scott

Re: [Fwd: F#]

2002-05-30 Thread Paul Hudak
Hi Don -- Thanks for all the informative stuff regarding FP implementations on .NET. However I am a little surprised by one thing you say: ... But the only truly serious complications added by .NET itself are (a) the general problem of Haskell interop with imperative libraries, requiring

Re: Ex 9.9 in Paul Hudak's book

2002-04-04 Thread Paul Hudak
What I would like to know is how the 'fix' function could be used to find the fixed point of a function like ( \n - 2*n ). Olaf and Lennart said a little about least fixpoints, but little about what makes a fixpoint least. Olaf suggested looking up papers on domain theory or denotational

  1   2   >