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
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
.
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
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
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
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
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
://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
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
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
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
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
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
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
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
reside.)
Doug McIlroy
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
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,
.
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
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
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
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
21 matches
Mail list logo