Many aspects of functional programming are generalisations of what goes
on in imperative languages.
Huh? In which sense is that?
All senses?
examples:
* I would say that let-polymorphic HM style type inference (with type
classes) is a generalisation of C/C++/Java style type checking +
operator o
On 5/3/05, Ben Lippmeier <[EMAIL PROTECTED]> wrote:
> Many aspects of functional programming are generalisations of what goes
> on in imperative languages.
Huh? In which sense is that?
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.has
G'day all.
Quoting Bo Herlin <[EMAIL PROTECTED]>:
> But there are functions that I cant find and that I assume others before
> me must have missed and then perhaps also implemented them.
> Is there any standard library with functions like:
>
> binomial
> isCatalan
> nthCatalan
> nextCatalan
> isP
On 5/5/05, Atwood, John Wesley <[EMAIL PROTECTED]> wrote:
> I tried to run Conal Elliott's Vertigo demos, on 3 diffferent XP boxes;
> it ran on none. The error is "Common Language Runtime Services -
> Appication has generated an exception that could not be handled.
> Process id=, Thread id=xx
On Wed, 2005-05-04 at 17:18 -0700, Greg Buchholz wrote:
> Here's a little quirk I ran into recently. While making a little
> vector data type in class Num (code below), I didn't implement an
> instance of "fromInteger" (thinking I didn't need it). Well as you can
> probably guess, it turns ou
I tried to run Conal Elliott's Vertigo demos, on 3 diffferent XP boxes;
it ran on none. The error is "Common Language Runtime Services -
Appication has generated an exception that could not be handled.
Process id=, Thread id=". Any suggestions?
http://conal.net/Vertigo/
John A
Here's a little quirk I ran into recently. While making a little
vector data type in class Num (code below), I didn't implement an
instance of "fromInteger" (thinking I didn't need it). Well as you can
probably guess, it turns out I did need it, and subsequently got a run
time exception. Wh
On Wednesday 04 May 2005 23:24, [EMAIL PROTECTED] wrote:
> Benjamin Franksen writes:
> > [EMAIL PROTECTED] wrote:
> >> Bryce Bockman writes:
> >>
> >> Don't confuse categories please. SICP doesn't say how to make a lazy
> >> variant of Scheme. Applicative protocol is not normal protocol, the
> >> r
There is also Template Haskell vs MetaOCaml.
For the life of me, I still cannot fathom why Template Haskell is untyped, while MetaOCaml is fully typed. Which is
the main reason I write meta-program in MetaOCaml and 'other' programs in Haskell.
There is the additional aspect that my meta-programs
On Wed, May 04, 2005 at 07:20:20PM +, Aaron Denney wrote:
> On 2005-05-03, David Roundy <[EMAIL PROTECTED]> wrote:
> > An interesting challenge would be to rewrite fftw in haskell, and see how
> > close one could come to the performance of the original... :)
>
> What precisely do you mean by t
Benjamin Franksen writes:
[EMAIL PROTECTED] wrote:
Bryce Bockman writes:
Don't confuse categories please. SICP doesn't say how to make a lazy
variant of Scheme. Applicative protocol is not normal protocol, the
reduction is, as it is.
We may have a different copy of SICP, but in mine (2nd editio
On Wed, 4 May 2005, Benjamin Franksen wrote:
We may have a different copy of SICP, but in mine (2nd edition) there is
Chapter 4.2 "Variantions on a Scheme -- Lazy Evaluation" and in particular
4.2.2 "An Interpreter with Lazy Evaluation".
Here's the direct link:
http://mitpress.mit.edu/sicp/full-te
> From: Benjamin Franksen <[EMAIL PROTECTED]>
> Date: Wed, 4 May 2005 22:47:21 +0200
>
> On Wednesday 04 May 2005 22:22, [EMAIL PROTECTED] wrote:
> > Bryce Bockman writes:
> > > Scheme is strict, so it lacks some of the flexibility (and drawbacks)
> > > that come from Laziness, but in the book the
I was trying to draw an analogy between imperitive and functional language
development over time. In both cases we seem to have a progression
towards More complicated type systems etc. That was really my only point.
To say C is to Imperative languages as Scheme is to functional languages
does
On Wednesday 04 May 2005 22:22, [EMAIL PROTECTED] wrote:
> Bryce Bockman writes:
> > Scheme is strict, so it lacks some of the flexibility (and drawbacks)
> > that come from Laziness, but in the book they teach you how to build a
> > Lazy version of Scheme, which is instructive in understanding wha
Bryce Bockman writes:
If it is syntactical simplicity that you like you might want to learn
Scheme as an introduction to FP. I'm no expert on either Scheme or
Haskell, but we all have to agree it is an elegant language. I'm
currently teaching myself the two in parallel, and I find that schem
Aaron Denney wrote:
> On 2005-05-03, David Roundy <[EMAIL PROTECTED]> wrote:
> > An interesting challenge would be to rewrite fftw in haskell, and see how
> > close one could come to the performance of the original... :)
>
> What precisely do you mean by that? FFTW is C code generated by OCaml?
>
On 2005-05-03, David Roundy <[EMAIL PROTECTED]> wrote:
> An interesting challenge would be to rewrite fftw in haskell, and see how
> close one could come to the performance of the original... :)
What precisely do you mean by that? FFTW is C code generated by OCaml?
Do you want to retarget ti so t
Daniel,
If it is syntactical simplicity that you like you might want to learn
Scheme as an introduction to FP. I'm no expert on either Scheme or
Haskell, but we all have to agree it is an elegant language. I'm
currently teaching myself the two in parallel, and I find that scheme is
sort of th
On 5/3/05, Michael Vanier <[EMAIL PROTECTED]> wrote:
> Lazy evaluation does make some kinds of idioms possible that are much
> harder to do with strict evaluation. For instance, here is an infinite
> list of ones:
You get something a lot like backtracking automatically by just having
your parser
At 7:40 AM -0400 2005/5/4, Daniel Carrera wrote:
[...]
I have a file called Test.hs and load it with ':l Test'. Then I
start exprimenting. I make a small change and type ':l Test' again.
So it's almost interactive, and not excessively akward.
You can get the same result by typing just ':r' (means
The list found at
http://haskell.org/libraries/#numerics
might be a good starting point for finding what you need.
I can recommend the "DoCon" library, which is pretty
sophisticated.
Another good choice might be the crypto library available
at:
http://www.haskell.org/crypto/
It also includ
Hi
I've been running Hugs for a couple of weeks now and I'm slowly starting
to get the Haskell idea, and I certanly like it!
But there are functions that I cant find and that I assume others before
me must have missed and then perhaps also implemented them.
Is there any standard library with func
That leaves one aspect of Haskell vs Ocaml I don't yet understand.
What are the advantages of lazy evaluation?
I'd recommend this paper (once again):
http://www.md.chalmers.se/~rjmh/Papers/whyfp.html
One of the main points of the paper is that lazy evaluation enables a
new way of modularizing cod
John Hughes wrote:
Benchmarks give a very one-sided view, ignoring the large effect that
ease of programming can have on the final system's performance.
Good point. Ease of programming helps you make /correct/ programs
quicker, and some times allows you to use more advanced algorithms that
you w
Hi Jerzy,
Thank you for your thorough response. I will archive it and come back to
it as a reference. As I learn more about FP features (e.g. Monads) I'll
be able to get more from your description.
But just a quick note:
4. A general observation about the use of both languages by a beginner who
Furthermore, the Haskell page says that ghc produces fast programs.
So I would guess that Haskell is faster than Python, but not as fast
as C.
Would that be correct?
Usually yes.
In a sense. I think it's important to remember that what matters is
performance of a whole application, not of
On Wed, May 04, 2005 at 05:11:37AM -0400, Daniel Carrera wrote:
> Hi all,
>
> Anyone here familiar with the Clean programming language?
>
> http://www.cs.ru.nl/~clean/
>
> It looks /very/ similar to Haskell, both in functionality and syntax.
>
> I would be grateful for any sort of comparison. I
Daniel Carrera wrote:
Hi all,
Anyone here familiar with the Clean programming language?
http://www.cs.ru.nl/~clean/
It looks /very/ similar to Haskell, both in functionality and syntax.
I would be grateful for any sort of comparison. I'm trying to decide
which language I should try to learn.
I se
On Wed, 4 May 2005, Simon Peyton-Jones wrote:
I'm afraid so, as of today. It's the kind of thing that could get fixed
if enough people wanted it, but at the moment it's pretty low on the
list.
Mutual dependent classes in separate modules are a consequence of
rigorously defining exactly one class
If you want to compare Haskell and Clean then take a look at Object
I/O library. It is ported to Haskell and you can learn a lot comparing
both implementations. I spent a lot of time translating Clean
functions to Haskell and my own impression is that Haskell's do
notation is much more easier that
I'm afraid so, as of today. It's the kind of thing that could get fixed
if enough people wanted it, but at the moment it's pretty low on the
list.
Simon
| -Original Message-
| From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
| Henning Thielemann
| Sent: 04 May 2005 10:31
|
On Wed, 4 May 2005, Simon Peyton-Jones wrote:
hi-boot files can't contain class declarations. This should be checked,
but isn't, hence puzzling message.
GHC 6.4 has a better setup. Actually, it still doesn't check for
absence of class decls, but it will shortly.
This means it is impossible to de
hi-boot files can't contain class declarations. This should be checked,
but isn't, hence puzzling message.
GHC 6.4 has a better setup. Actually, it still doesn't check for
absence of class decls, but it will shortly.
Simon
| -Original Message-
| From: [EMAIL PROTECTED]
[mailto:[EMAIL
Donn Cave <[EMAIL PROTECTED]> writes:
> I have been able to build ocaml everywhere I have wanted it, including
> the native code compiler.
And it builds itself much faster than GHC.
(I couldn't measure how much, because GHC didn't build at all, failing
to find HsBaseConfig.h.in.)
--
__("<
Hi all,
Anyone here familiar with the Clean programming language?
http://www.cs.ru.nl/~clean/
It looks /very/ similar to Haskell, both in functionality and syntax.
I would be grateful for any sort of comparison. I'm trying to decide
which language I should try to learn.
Cheers,
Daniel.
__
I tried to set up mutual recursive modules according to section 4.6.10. of
the manual of GHC-6.2.2. I illustrate my problems with a simple fictitious
example.
A.hi-boot
module A where
class GHC.Num.Num a => C a where
answer :: a
f :: B.T -> GHC.Num.Int
A.hs
module A where
Daniel Carrera wrote:
> Hi all,
>
> Thank you for all the information on my previous question. I learned a
> lot, and good pointers to more info.
>
> My next question is about speed. How fast would you consider Haskell?
> (say, for computational work). How would you compare it to C, Python and
> Ru
On Wed, 4 May 2005 03:02:58 -0400
[EMAIL PROTECTED] wrote:
> Quoting Erik de Castro Lopo <[EMAIL PROTECTED]>:
>
> > Yes, but only if your functions are impure.
>
> Wrong. An unevaluated thunk can, in general, be much larger than what
> the thunk evaluates to. (Think of "length" of a large lis
G'day all.
On Tue, 3 May 2005 21:04:46 -0700
Andrew Pimlott <[EMAIL PROTECTED]> wrote:
> > The advantage of lazy evaluation is that evaluation order becomes one
> > less thing you have to think about.
Quoting Erik de Castro Lopo <[EMAIL PROTECTED]>:
> Yes, but only if your functions are pure.
40 matches
Mail list logo