Re: [Haskell] please HELP me to understand this code:| quickly:((

2008-02-12 Thread Dan Weston
Before replying further to the spambot "xxxyyyzzz", I think it should be noted that the sender's e-mail address looks an awful lot like: Screw-You-Guys at yahoo dot com I fear our alacritous Neil will now be the unwilling recipient of Haskell porn and Nigerian bank scams... :( Neil Mitchell

Re: [Haskell] Extensible records: Static duck typing

2008-02-08 Thread Dan Weston
Ouch. How would a human parse [apple'*'pear] If this doesn't immediately scan as [ (*') (apple') (pear) ] to you (it doesn't to me) then maybe allowing ' in infix operators may not be the best thing. John Meacham wrote: On Tue, Feb 05, 2008 at 08:01:07AM -0500, Cale Gibbard wrote: I also li

Re: [Haskell] ANNOUNCE: fixpoint 0.1

2007-11-20 Thread Dan Weston
Good stuff! You might also want to consider including code from Uustalu et al, "Recursion Schemes from Comonads", 2001 http://citeseer.ist.psu.edu/uustalu01recursion.html Chapter 7 has code formatted as Literate Haskell that generalizes cata, ana, hylo (iteration), and para (primitive recursion

Re: [Haskell] Fingerprints and hashing

2007-10-11 Thread Dan Weston
> One example of such an minusFP (not recommended) is (foldr xor 0): Obviously I meant that FP = foldr xor 0. minusFP would be a simple unfolding of this. Dan Weston wrote: I am zero training in cryptography, but I would think that if in addition to FP(as ++ bs) = FP(bs) `plusFPFlip

Re: [Haskell] Fingerprints and hashing

2007-10-11 Thread Dan Weston
++ []) = FP(as) as expected. There must be more robust such monoidal functors out there. Refactorization could be limited to respect substructure boundaries reflected in the serialization. Dan Weston Simon Peyton-Jones wrote: Interesting! The associativity property is the kind of thing I was after

Re: [Haskell] ANN: ListLike, a generic interface over list-like structures

2007-09-17 Thread Dan Weston
I noticed that there is no Data.Foldable context to your FoldableLL class. How does your ListLike API work with/compare to/derive from the classes in Data.Traversable? http://darcs.haskell.org/ghc-6.6/packages/base/Data/Traversable.hs Dan Weston John Goerzen wrote: Hi, I'm pleas

Re: [Haskell] ST vs State

2007-05-31 Thread Dan Weston
I thought the types were *existentially* quantified because the constructor arguments were *universally* quantified. Or did I get it backwards? Dan Wolfgang Jeltsch wrote: Am Mittwoch, 30. Mai 2007 14:09 schrieb Brandon S. Allbery KF8NH: On May 30, 2007, at 5:59 , Federico Squartini wrote:

Re: [Haskell] Fixpoint combinator without recursion

2007-04-04 Thread Dan Weston
What is it called if it's both? Is this even legal in Haskell? It seems as though this would not be a grounded type, going on forever in both directions. Dan Stefan O'Rear wrote: On Wed, Apr 04, 2007 at 01:36:18PM -0700, Michael Vanier wrote: For those of us who aren't type theorists: What's

Re: [Haskell] Call-by-name: moved to haskell-cafe

2007-03-20 Thread Dan Weston
Dan Weston wrote: Douglas Philips wrote: On 2007 Mar 20, at 3:30 PM, Dan Weston indited: I looked up John Backus on wikipedia and followed a link to ALGOL: http://en.wikipedia.org/wiki/ALGOL_60 where the following "undesirable" property of call-by-name is mentioned. "ALGOL 60

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

2007-03-20 Thread Dan Weston
Douglas Philips wrote: On 2007 Mar 20, at 3:30 PM, Dan Weston indited: I looked up John Backus on wikipedia and followed a link to ALGOL: http://en.wikipedia.org/wiki/ALGOL_60 where the following "undesirable" property of call-by-name is mentioned. "ALGOL 60 allowed for

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

2007-03-20 Thread Dan Weston
are an integer variable and an array that is indexed by that same integer variable. However, call-by-name is still beloved of ALGOL implementors for the interesting thunks that are used to implement it." I suppose that call-by-name is still beloved of Haskell implementors as well? Dan West

Re: [Haskell] Quicksearch vs. lazyness

2007-03-19 Thread Dan Weston
I left my copy of Chris Okasaki's "Functional Data Structures" at home, but I seem to recall (vaguely) that his heap sort algorithm was best for sorting/searching the first k elements of an orderable sequence. If you don't have a copy of this book, you should definitely get one. It is his diss

Re: [Haskell] How to make sure that a function is evaluated only once?

2006-12-22 Thread Dan Weston
I thought a let expression was just as lazy as a where clause. Is this not true? Dan Lemmih wrote: On 12/22/06, Axel Jantsch <[EMAIL PROTECTED]> wrote: Thanks to all who replied. I still haven't figured out a solution. I thought about memoizing the result, as several of you have suggested, b

[Haskell] Re: Num is such a fat and greedy class

2006-12-08 Thread Dan Weston
Oops, sorry. I meant to send this to haskell-cafe. My bad! ___ Haskell mailing list Haskell@haskell.org http://www.haskell.org/mailman/listinfo/haskell

[Haskell] Num is such a fat and greedy class

2006-12-08 Thread Dan Weston
The following observations are not new, insightful, or gracious, but I was lusting after the innocent +,-,* operators for my own evil ends and was mildly curious why... Num is such a fat and greedy class. If you want to marry Cinderella, you have to take her ugly stepsisters too. 1) Groups m

[Haskell] GHC inferred type different for pointed/point-free defs?

2006-11-03 Thread Dan Weston
Help! One of two things is going on: 1) I don't understand what I'm doing 2) GHC is inferring different types for pointed and point-free function definition. I wanted to define Haskell equivalents to the C ternary operator. Basically, predicate ??? doIfTrue ||| doIfFalse For some reason, tho

Re: edison question

2002-07-31 Thread Dan Weston
The author of edison, Chris Okasaki, wrote a book called "Purely Functional Data Structures" (Cambridge University Press). It goes a long way toward explaining the rationale of many of the structures. On Wed, 31 Jul 2002 [EMAIL PROTECTED] wrote: > Thanks, and it works! Another question is wher