Re: [Haskell-cafe] Non-recursive let

2013-07-11 Thread Doug McIlroy
By analogy to ML, which has let and let rec, where the latter corresponds to Haskell's let, one is led to let nonrec. I would definitely not like shadow, for it means that new variable does NOT cast a shadow on its definining expression. I fear also that let nonrec by any name would introduce

Re: [Haskell-cafe] Remove Enum from Float and Double

2013-06-26 Thread Doug McIlroy
definition's oafish attempt to get right things like [0.0,0.1..1.0] needs major revision. Doug McIlroy ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] ifdef based on which OS you're on

2013-02-17 Thread Doug McIlroy
. 2. Ifdefs violate program structure. All ifdefs appear at top level. Yet, save for those that control top-level declarations, they embody conditionals at inner levels of structure. Doug McIlroy ___ Haskell-Cafe mailing list Haskell-Cafe

Re: [Haskell-cafe] education or experience?

2012-12-09 Thread Doug McIlroy
lagged on data types. FP also deserves credit for infinite data structures (though the special case of stream processing dates way back). Doug McIlroy * It's amusing to note that real Booleans--the ones that Boole used--were integers. For Boole, or(a,b) = a + b - a*b

Re: [Haskell-cafe] education or experience?

2012-12-09 Thread Doug McIlroy
Lazy evaluation--at the heart of spreadsheets since the beginning. Never thought of that -- nice! Unfortunately it's not literally true, because spreadsheets push recalculated values to all the variables that depend on them, rather than waiting until the dependent values are needed. But the

Re: [Haskell-cafe] education or experience?

2012-12-09 Thread Doug McIlroy
___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] size of Haskell Platform

2012-11-11 Thread Doug McIlroy
started.] What principles guide the selection of components for all you need to get up and running? Doug McIlroy ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] attoparsec double precision, quickCheck and aeson

2012-06-06 Thread Doug McIlroy
://www.netlib.org/fp/dtoa.c. (Alas, dtoa.c achieves calculational perfection via a murmuration of #ifdefs.) It's disheartening to hear that important Haskell code has needlessly fallen from perfection--perhaps even deliberately. Doug McIlroy ___ Haskell-Cafe

Re: [Haskell-cafe] Requesting Feedback: I Love Haskell, but can't find a place to use it

2012-06-01 Thread Doug McIlroy
the theorem without the help of Haskell. (This without even bringing in the heavy artillery of higher-order functions and monads.) Doug McIlroy ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Requesting Feedback: I Love Haskell, but can't find a place to use it

2012-06-01 Thread Doug McIlroy
the theorem without the help of Haskell. (This without even bringing in the heavy artillery of higher-order functions and monads.) Doug McIlroy ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] adding the elements of two lists

2012-03-29 Thread Doug McIlroy
From: Richard O'Keefe o...@cs.otago.ac.nz Date: Thu, 29 Mar 2012 16:34:46 +1300 On 29/03/2012, at 3:08 PM, Doug McIlroy wrote: - without newtype toSeries f = f : repeat 0 -- coerce scalar to series instance Num a = Num [a] where (f:fs) + (g:gs) = f+g : fs+gs

[Haskell-cafe] winhugs interrupts

2012-03-28 Thread Doug McIlroy
On windows I have long used hugs under cygwin, but hugs doesn't get along well with cygwin's latest terminal emulator. So I switched to winhugs. Small problem that looms big: how do you interrupt an interminable expression evaluation in winhugs? Doug

Re: [Haskell-cafe] adding the elements of two lists

2012-03-28 Thread Doug McIlroy
Date: Tue, 27 Mar 2012 11:03:54 +1300 From: Richard O'Keefe o...@cs.otago.ac.nz Subject: Re: [Haskell-cafe] adding the elements of two lists To: jerzy.karczmarc...@unicaen.fr Cc: haskell-cafe@haskell.org And *that* is why I stopped trying to define instance Num t = Num [t]. If I KNEW that

[Haskell-cafe] Haskell showcase in 5 minutes

2012-02-28 Thread Doug McIlroy
Here's an example that fits comfortably in 5 minutes--if your audience knows elementary calculus: http://www.cs.dartmouth.edu/~doug/powswer.html It depends critically on lazy evaluation, which knocks out a lot of competing languages right from the start. The five-minute version would begin with

[Haskell-cafe] Haskell showcase in 5 minutes

2012-02-28 Thread Doug McIlroy
Sorry, a typo in the url for the power-series example. It should have been http://www.cs.dartmouth.edu/~doug/powser.html ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] [haskell-cafe] Some reflections on Haskell

2012-02-14 Thread Doug McIlroy
reside.) Doug McIlroy ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] [haskell-cafe] Some reflections on Haskell

2012-02-14 Thread Doug McIlroy
Markus: What about hoogle/hayoo and hackage? Antoine: Do you have any links to examples that we should imitate? Hackage is notionally similar to the Java API documentation at http://www.oracle.com/technetwork/java/javase/documentation/ But Hackage Documentation pages typically only give syntax,

[Haskell-cafe] [Haskell Cafe] strict version of Haskell - does it exist?

2012-01-30 Thread Doug McIlroy
. If you even have to think once about what needs to be strict or non-strict, then non-strict is the only viable default. I can't imagine writing any interesting Haskell code that will successfully run all strict. Doug McIlroy ___ Haskell-Cafe mailing

[Haskell-cafe] numeric coercion in ghci vs hugs

2012-01-08 Thread Doug McIlroy
After loading the one-line file default (Integer,Rational,Double) the input 1::Fractional t = t in ghci yields the output 1.0 and in hugs 1%1 The ghci answer appears not to respect the default declaration. What's going on? Doug McIlroy

Re: [Haskell-cafe] If you haven't bought any of Knuth's fascicles yet, this is definitely the one to get. Bitwise Tricks Techniques

2009-11-19 Thread Doug McIlroy
One of Knuth's sources is the well-named book Hacker's Delight by Henry S. Warren; see hackersdelight.org ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] omitting params in function bindings

2009-11-17 Thread Doug McIlroy
Is there a deep reason (beyond saving a sentence or two in the language definition) for requiring all patterns in a function binding to have the same explicit arity? For example, in dropWhile0 :: Num a = [a] - [a] dropWhile0 (0:xs) = dropWhile0 xs dropWhile0 xs = xs why