Why Perl is more learnable than Haskell

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
90 messages Options
12345
Reply | Threaded
Open this post in threaded view
|

Why Perl is more learnable than Haskell

kynn
Perl is a large, ugly, messy language filled with quirks and eccentricities, while Haskell is an extremely elegant language whose design is guided by a few overriding ideas.  (Or so I'm told.)

Based on this one would think that it would be much easier to learn Haskell than to learn Perl, but my experience is exactly the opposite.

I've been wanting to learn Haskell for years, literally, but it has been a case of Sisyphus and the Rock.  Despite my efforts, I never get to the level of expertise that would make Haskell useful to me.  (I don't need elegant factorial or Fibonacci functions in my everyday work.)  Sooner or later life intervenes: big project due, long trip abroad, etc., and when I finally return to learning Haskell, I have forgotten almost everything I learned and I have to start all over again.  (BTW, I've heard similar stories from many wannabe Haskell programmers.)

Arguably, this experience means that I have no business learning Haskell, because it's just not relevant to my work.  Maybe so, but I still cling to the fanciful notion that if I knew Haskell well enough, I would find plenty of stuff to do with it in my daily work...

Anyway, in contrast to my struggle with Haskell, I learned Perl incrementally over the years, by using it in daily little projects, ranging at first from command-line snippets to 100-line self-contained scripts, and moving on to larger, hairier projects.  This daily reinforcement of the little bits of Perl I was picking up was crucial to my being able to retain it and move forward.

Perhaps Haskell will never lend itself to something like a Perl one-liner, but still I wish that there were books on Haskell that focused on making Haskell useful to the learner as quickly as possible...  If such already exist and I've missed it, please let me know.

Or I can always wait until I retire; then I'll probably have a sufficiently long stretch of free time in my hands (barring any operations, strokes, heart attacks, hip fractures, etc.).  I bet I could start a Haskell Wannabes Club at the nursing home...

kj
Reply | Threaded
Open this post in threaded view
|

Re: Why Perl is more learnable than Haskell

Donald Bruce Stewart
kynnjo:
> Perhaps Haskell will never lend itself to something like a Perl one-liner,
> but still I wish that there were books on Haskell that focused on making
> Haskell useful to the learner as quickly as possible...  If such already
> exist and I've missed it, please let me know.

There's some things in the works, but for now you can perhaps find
something relevant to what you're trying to do here,

    http://haskell.org/haskellwiki/Blog_articles

There's a good breadth of topics covered.

Also, I recommend hanging out on #haskell, you'll just see so many
interesting haskell snippets, have people to help answer questions, and
of course, the lambdabot, that you can't help but learn haskell by
osmosis!
   
    http://haskell.org/haskellwiki/IRC_channel

Good luck. Hope to see you online.

-- Don

P.S. Have a fix point!  Control.Monad.Fix.fix ((1:) . scanl (+) 1)
_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: Why Perl is more learnable than Haskell

riccardo cagnasso
In reply to this post by kynn
My opinion is that "learnin haskell is difficult" is just for the fact that when you learn programming, you probably begin with C / C++ or some other procedural/OO programming language, so you get used to think in these ways, and when you have to switch to functional paradigm, you find it difficoult.

If you first language is LISP probably you find easy Haskell and difficult pearl.

2007/4/11, kynn <[hidden email]>:

Perl is a large, ugly, messy language filled with quirks and eccentricities,
while Haskell is an extremely elegant language whose design is guided by a
few overriding ideas.  (Or so I'm told.)

Based on this one would think that it would be much easier to learn Haskell
than to learn Perl, but my experience is exactly the opposite.

I've been wanting to learn Haskell for years, literally, but it has been a
case of Sisyphus and the Rock.  Despite my efforts, I never get to the level
of expertise that would make Haskell useful to me.  (I don't need elegant
factorial or Fibonacci functions in my everyday work.)  Sooner or later life
intervenes: big project due, long trip abroad, etc., and when I finally
return to learning Haskell, I have forgotten almost everything I learned and
I have to start all over again.  (BTW, I've heard similar stories from many
wannabe Haskell programmers.)

Arguably, this experience means that I have no business learning Haskell,
because it's just not relevant to my work.  Maybe so, but I still cling to
the fanciful notion that if I knew Haskell well enough, I would find plenty
of stuff to do with it in my daily work...

Anyway, in contrast to my struggle with Haskell, I learned Perl
incrementally over the years, by using it in daily little projects, ranging
at first from command-line snippets to 100-line self-contained scripts, and
moving on to larger, hairier projects.  This daily reinforcement of the
little bits of Perl I was picking up was crucial to my being able to retain
it and move forward.

Perhaps Haskell will never lend itself to something like a Perl one-liner,
but still I wish that there were books on Haskell that focused on making
Haskell useful to the learner as quickly as possible...  If such already
exist and I've missed it, please let me know.

Or I can always wait until I retire; then I'll probably have a sufficiently
long stretch of free time in my hands (barring any operations, strokes,
heart attacks, hip fractures, etc.).  I bet I could start a Haskell Wannabes
Club at the nursing home...

kj

--
View this message in context: http://www.nabble.com/Why-Perl-is-more-learnable-than-Haskell-tf3559193.html#a9938938
Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com.

_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe



--
I invented the term Object-Oriented, and I can tell you I did not have C++ in mind. (Alan Kay)
_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: Why Perl is more learnable than Haskell

Will Newton-4
In reply to this post by kynn
On 4/11/07, kynn <[hidden email]> wrote:
>
> Perl is a large, ugly, messy language filled with quirks and eccentricities,
> while Haskell is an extremely elegant language whose design is guided by a
> few overriding ideas.  (Or so I'm told.)
>
> Based on this one would think that it would be much easier to learn Haskell
> than to learn Perl, but my experience is exactly the opposite.

I've been trying to learn Haskell for some time also, and I've learnt
lots of various other languages in the past. I think one of the
biggest problems is if there is a considerable learning curve, which
Haskell undoubtedly has, there's a nagging question in the back of
your head while you try and get a simple task accomplished in an
unfamiliar language - "why am I bothering with this, I could do it in
5 minutes in Perl/Python/Ruby/...!".

And for many simple tasks Perl is a really good fit - it's best to
find a task that plays to Haskell's strengths so you get a bit of
positive reinforcement while you work. I have been working with Parsec
to do some parsing recently and I can definitely recommend it. I don't
think I've used such a capable and easy to use parsing framework in
any language and it's really kept me going with Haskell where I might
have "just done it in Python" in the past.
_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: Why Perl is more learnable than Haskell

Mark T.B. Carroll-2
In reply to this post by kynn
Sorry to hear of your struggles. There has been a lot of work lately on
writing Haskell tutorials but there's still a long way to go,
unfortunately, as I discovered when I tried recently to find the
collection of sample code fragments on the wiki that I'm sure are around
somewhere.

I had the advantage of coming to Haskell after already having used ML
and Common Lisp. But, FWIW, I found it worth persevering: I liked a lot
of my legacy Perl scripts more after I ported them to Haskell and now I
use Haskell for the sort of thing I might have used bash or perl for
previously. (For instance, on the way home last night my GPS' NMEA-0183
data was odd enough that I used Haskell to write a simple daemon that
sits between clients and my gpsd and rewrites their conversation;
previously, I'd have used Perl for that.)

Though, it helps if you get on well with Perl. It didn't suit me very
well so I had more motivation to switch than you might. But, now, by
choice, I do use Haskell for the kind of thing I'd have previously used
a short script for instead, so there might still be light at the end of
the tunnel for you.

-- Mark

_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: Why Perl is more learnable than Haskell

tphyahoo
In reply to this post by kynn
I am also coming at haskell from a perl background.

While there is some truth to what you say, I do think haskell can be
used for "keeping simple things simple" in a way similar to perl.
Though you have to search harder since the documentation / tutorials
seem to be more optimized for "making hard things possible". (And in
fact, much easier than in perl.)

But back to the easy, here is a thread concerning one liners in haskell

http://groups.google.de/group/fa.haskell/browse_thread/thread/e948ff0ad4d7c0c9/ac0a46d1f841db59?lnk=st&q=haskell+one+liners&rnum=1&hl=en#ac0a46d1f841db59

I think if you really have desire the best route is to complement
googling around with asking on #haskell and the newsgroups. It's a
*very* friendly community.

hope this helps!

2007/4/11, kynn <[hidden email]>:

>
> Perl is a large, ugly, messy language filled with quirks and eccentricities,
> while Haskell is an extremely elegant language whose design is guided by a
> few overriding ideas.  (Or so I'm told.)
>
> Based on this one would think that it would be much easier to learn Haskell
> than to learn Perl, but my experience is exactly the opposite.
>
> I've been wanting to learn Haskell for years, literally, but it has been a
> case of Sisyphus and the Rock.  Despite my efforts, I never get to the level
> of expertise that would make Haskell useful to me.  (I don't need elegant
> factorial or Fibonacci functions in my everyday work.)  Sooner or later life
> intervenes: big project due, long trip abroad, etc., and when I finally
> return to learning Haskell, I have forgotten almost everything I learned and
> I have to start all over again.  (BTW, I've heard similar stories from many
> wannabe Haskell programmers.)
>
> Arguably, this experience means that I have no business learning Haskell,
> because it's just not relevant to my work.  Maybe so, but I still cling to
> the fanciful notion that if I knew Haskell well enough, I would find plenty
> of stuff to do with it in my daily work...
>
> Anyway, in contrast to my struggle with Haskell, I learned Perl
> incrementally over the years, by using it in daily little projects, ranging
> at first from command-line snippets to 100-line self-contained scripts, and
> moving on to larger, hairier projects.  This daily reinforcement of the
> little bits of Perl I was picking up was crucial to my being able to retain
> it and move forward.
>
> Perhaps Haskell will never lend itself to something like a Perl one-liner,
> but still I wish that there were books on Haskell that focused on making
> Haskell useful to the learner as quickly as possible...  If such already
> exist and I've missed it, please let me know.
>
> Or I can always wait until I retire; then I'll probably have a sufficiently
> long stretch of free time in my hands (barring any operations, strokes,
> heart attacks, hip fractures, etc.).  I bet I could start a Haskell Wannabes
> Club at the nursing home...
>
> kj
>
> --
> View this message in context: http://www.nabble.com/Why-Perl-is-more-learnable-than-Haskell-tf3559193.html#a9938938
> Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com.
>
> _______________________________________________
> Haskell-Cafe mailing list
> [hidden email]
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>
_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: Why Perl is more learnable than Haskell

dfeustel
In reply to this post by kynn


-----Original Message-----

>From: "Mark T.B. Carroll" <[hidden email]>
>Sent: Apr 11, 2007 10:18 AM
>To: kynn <[hidden email]>
>Cc: [hidden email]
>Subject: Re: [Haskell-cafe] Why Perl is more learnable than Haskell
>
>Sorry to hear of your struggles. There has been a lot of work lately on
>writing Haskell tutorials but there's still a long way to go,
>unfortunately, as I discovered when I tried recently to find the
>collection of sample code fragments on the wiki that I'm sure are around
>somewhere.

A serious omission in Haskell tutorials is a collection of examples of how to
write Haskell solutions for problems that would use arrays in any imperative language.
I see that arrays can be defined in Haskell, but I don't see their use as
computationally efficient in Haskell.



http://RepublicBroadcasting.org - Because You CAN Handle The Truth!
http://iceagenow.com - Because Global Warming Is A Scam!


_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: Why Perl is more learnable than Haskell

brad clawsie-2
In reply to this post by kynn
On Wed, Apr 11, 2007 at 05:55:08AM -0700, kynn wrote:
>
> Perl is a large, ugly, messy language filled with quirks and eccentricities,
> while Haskell is an extremely elegant language whose design is guided by a
> few overriding ideas.  (Or so I'm told.)

i find that don's "haskell hacking blog" has been written with the daily
hacker in mind:

http://cgi.cse.unsw.edu.au/~dons/blog

my own experience is that i would gladly replace perl for many tasks
if haskell's libraries were *easier to use*. for common and simple tasks
like reading data from a network resource (http, ftp), querying a
database, accessing xml (dom, etc), its more important to me to have
an api that is simple to use than one that takes an "interesting"
approach. perl's apis for these tasks tend to be very simple.

hackage seems to be on track to deliver the advantages of the cpan
tool and repository, so in that sense i think one of the key
advantages of perl has been adopted by the haskell community.

both languages have great communities!
_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: Why Perl is more learnable than Haskell

riccardo cagnasso
The post on dons' blog about the cpu scaler is a great example on how haskell can easily used in the day-to-day hacking!


2007/4/11, brad clawsie <[hidden email]>:
i find that don's "haskell hacking blog" has been written with the daily
hacker in mind:

<a onclick="return top.js.OpenExtLink(window,event,this)" href="http://cgi.cse.unsw.edu.au/%7Edons/blog" target="_blank">http://cgi.cse.unsw.edu.au/~dons/blog
_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe



--
I invented the term Object-Oriented, and I can tell you I did not have C++ in mind. (Alan Kay)
_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: Why Perl is more learnable than Haskell

Alex Queiroz-2
Hallo,

On 4/11/07, riccardo cagnasso <[hidden email]> wrote:
> The post on dons' blog about the cpu scaler is a great example on how
> haskell can easily used in the day-to-day hacking!
>

     Just read it, it's a very nice post. I'm not afraid of math, but
it's a relief to see some code I can relate with. :-)

--
-alex
http://www.ventonegro.org/
_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
jrv
Reply | Threaded
Open this post in threaded view
|

Re: Why Perl is more learnable than Haskell

jrv
In reply to this post by kynn
On Wed, Apr 11, 2007 at 05:55:08AM -0700, kynn wrote:
>
> Perl is a large, ugly, messy language filled with quirks and eccentricities,
> while Haskell is an extremely elegant language whose design is guided by a
> few overriding ideas.  (Or so I'm told.)
>
> Based on this one would think that it would be much easier to learn Haskell
> than to learn Perl, but my experience is exactly the opposite.
> Haskell useful to the learner as quickly as possible...  If such already
....snip

> exist and I've missed it, please let me know.
>
> Or I can always wait until I retire; then I'll probably have a sufficiently
> long stretch of free time in my hands (barring any operations, strokes,
> heart attacks, hip fractures, etc.).  I bet I could start a Haskell Wannabes
> Club at the nursing home...
>
> kj

My experience is a lot like yours, except I retired 5 years ago, and still
haven't learned Haskell.  Unfortunately, I've had lots of interruptions
that have kept me away from the keyboard.  I've got a few unfinished
projects, including one I started in Perl years ago, moved to Python, then
moved to Haskell.  The only useful thing I've programmed since I retired
was a program to update my checkbook/bank statement postgresql database
using Prolog for parsing entries the way I like to write them in a text
file.  Someday I'll move this to Haskell :-).  I've sworn off other
languages since I don't have any deadlines except my own.

I never really learned Perl, but I used it a lot for simple one to thirty
liners.  The thing was, any thing I wanted to do I could find the bits and
pieces of in "Learning Perl", "Programming Perl", or "Learning Perl/TK".

I have on my shelf "Haskell: The craft...", "The Haskell school of
expression", and "The Haskell road to Logic...".  I've "read" them.  I know
I should sit down with each one at the computer and work through the
exercises.  But..,.

When my current spate of unavoidable interruptions is over, I'll look into
the email on Haskell one-liners, and some of the new tutorials to try to
come back up to speed.  Not in a nursing home yet!

Good luck,

John Velman
_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: Why Perl is more learnable than Haskell

David Tolpin-2
In reply to this post by riccardo cagnasso


If you first language is LISP probably you find easy Haskell and difficult pearl.


Hi,

my first programming language is lisp (that is, the language I am most fluent in -- recently Common Lisp, earlier Scheme) and I find Haskell a problematic programming language (this is a fresh experience -- I am writing a syndrome-networks based DSS in Haskell now) because it is not a language. Lisp is a language and Haskell is not, in the sense that lisp allows to write programs that can be read aloud and understood from reading the code.

Haskell is a notation that is not a literature by itself, and for Haskell, literate programming, that is, writing more comments than code, is a must; while for lisp it is a rather exotic practice.

David




_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: Why Perl is more learnable than Haskell

Jim Burton
In reply to this post by kynn

kynn wrote
Perl is a large, ugly, messy language filled with quirks and eccentricities, while Haskell is an extremely elegant language whose design is guided by a few overriding ideas.  (Or so I'm told.)

[snip]
May I ask why you want to learn it so much, if you find it so hard? I'm sure most would disagree with me but maybe you'd be better off with perl for your one liners and scripts if it serves your purpose well. You say that you've heard Haskell is extremely elegant, but is that really the reason you want to start using it as your general purpose and scripting language? I'm also interested in it myself because of it's elegance, and in order to learn different paradigms, to explore the strength of the type system etc etc, but I'm not in a particular rush to be able to use it as the one true language for scripting or web applications, or xyz, as quite a few people lately seem to be asking about. Just curious.
Reply | Threaded
Open this post in threaded view
|

Re: Why Perl is more learnable than Haskell

Brandon Michael Moore
In reply to this post by Will Newton-4
On Wed, Apr 11, 2007 at 02:21:41PM +0100, Will Newton wrote:

> On 4/11/07, kynn <[hidden email]> wrote:
> >
> >Perl is a large, ugly, messy language filled with quirks and
> >eccentricities,
> >while Haskell is an extremely elegant language whose design is guided by a
> >few overriding ideas.  (Or so I'm told.)
> >
> >Based on this one would think that it would be much easier to learn Haskell
> >than to learn Perl, but my experience is exactly the opposite.
>
> I've been trying to learn Haskell for some time also, and I've learnt
> lots of various other languages in the past. I think one of the
> biggest problems is if there is a considerable learning curve, which
> Haskell undoubtedly has, there's a nagging question in the back of
> your head while you try and get a simple task accomplished in an
> unfamiliar language - "why am I bothering with this, I could do it in
> 5 minutes in Perl/Python/Ruby/...!".
>
> And for many simple tasks Perl is a really good fit - it's best to
> find a task that plays to Haskell's strengths so you get a bit of
> positive reinforcement while you work. I have been working with Parsec
> to do some parsing recently and I can definitely recommend it. I don't
> think I've used such a capable and easy to use parsing framework in
> any language and it's really kept me going with Haskell where I might
> have "just done it in Python" in the past.

Writing interpreters is one task where Haskell is really nice.
I suggest Unlambda, it makes a nice toy language. The syntax
is easy to work with, and continuations make the semantics
interesting enough that you can't just rely on the host language
acting the same way, like you generally can with mutable state,
sequential evaluation and so on (unless you're using something
like scheme or ml, but then you probably wouldn't have trouble
with Haskell).

Brandon
_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: Why Perl is more learnable than Haskell

David Tolpin-2
In reply to this post by David Tolpin-2
Hi,

I'm guessing you're not doing it the right way.

cvs -d :pserver:[hidden email]:/srv/CVSROOT co SYRENE/src

 
By using types, you implementation becomes a lot more readable.

Being readable is not enough for being readable aloud.

And I think a lot of people here will disagree with you...


That's good news.  I would not bother to express my option if I thought that there would not be a lot of people who would disagree.

David


_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: Why Perl is more learnable than Haskell

Tomasz Zielonka
In reply to this post by kynn
On Wed, Apr 11, 2007 at 05:55:08AM -0700, kynn wrote:
> Perl is a large, ugly, messy language filled with quirks and eccentricities,
> while Haskell is an extremely elegant language whose design is guided by a
> few overriding ideas.  (Or so I'm told.)
>
> Based on this one would think that it would be much easier to learn Haskell
> than to learn Perl, but my experience is exactly the opposite.

Perhaps it's just that being more elegant doesn't make it easier to
learn. There are almost no overriding ideas in SKI combinator calculus,
but I wouldn't say it's a nice and easy programming language (Well, OK,
I didn't try to master it, so maybe I'm wrong).

The biggest problem with Haskell is that not only you can do things
differently (than in other languages) - you have to! Also, some tasks
are only easy when you know some advanced programming techniques, like
parsing with parser combinators. There is also the problem that
fundamental concepts are quite entangled, and it's difficult to choose
the starting point when learning or teaching.

The language also seems a bit schizophrenic. For example, you can say
that it has side-effects and that it has no side-effects, and both
statements are true in some sense (expression evaluation has no
side-effects but there are features like IO, mutable arrays, etc. - it's
quite difficult to explain to beginners why there is no contradiction,
or where is the trick, in other words).

Actually, I don't know which is the biggest problem... and there are
more of them.

Best regards
Tomasz
_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: Why Perl is more learnable than Haskell

Ryan Dickie
In reply to this post by kynn
I thought I could resist this thread but I'll bite =:-()

The first language i learned was basic. No real functions, simple step by step instructions. I then learned hypercard, c, c++, python, assembly, vhdl, and too many others!

Now i've decided to learn haskell. I view it as a mathematicians language. I do research in the field of medical imaging.. particularly processing large cardiac data sets to figure out characteristics, diseases, etc. Why workflow generally starts out as 1) mathematical idea 2) turn that pure equation into a numerical recipe 3) implement, debug 5) analyze 6) goto step 1. I find doing my thinking in the continous domain makes things a lot easier.

But here's where i differ from everyone else. I already have the mathematical relationships all nice and tidy (hopefully!) in my head before i start. I literally just implement it. I don't want to care about threading, IO, message passing, or numerical stability. I have to care about performance but only so far as it hampers my productivity. Preferably the language will do it implicitly.

Your average programmer wants a language to do tasks. Having to think about the math and relationships behind it all is rather sickening to them (and me too!).

I am a new haskell programmer (basically a week into it!). It is by far the hardest language i've had to pick up. A lot of my code could be structured in a functional way.. but almost all reply on looping techniques (would take a lot of work to rethink my gradient descent method and make it fast!).  Regardless of actually using haskell.. i like to transfer these techniques to c++. Before i even knew of haskell i knew some FP methods and i found that using these shrunk my code, shrunk the bugs, and did nice things for performance + concurrency. In fact, I just read a google paper on their batch system. They use to functions: map and reduce. They can easily split it up over their cluster etc... these are the ideas of FP that i like! That and the set-builder notation.

I also hate matlab to death. Is there any possibility of using haskell as a replacement using ghci? Mostly i care about linalg when it comes to using matlab.

ps: sorry if gmail butchered this reply. I had subscribed to the digest and turns out that was a mistake :D

_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: Why Perl is more learnable than Haskell

Udo Stenzel
In reply to this post by kynn
kynn wrote:
> (I don't need elegant
> factorial or Fibonacci functions in my everyday work.)

I think you do.  Most of your utility programs probably fit into the
simple frame of

main = interact $ unlines . map f . lines

for suitable f.  Of course, f is hardly ever the factorial function, but
it is a function.  My guess is, you think you "just wanted a loop" when
in reality you need to lift a function to work over a list.


> Or I can always wait until I retire; then I'll probably have a sufficiently
> long stretch of free time in my hands

You may need patience, too.


-Udo

_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe

signature.asc (196 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Re: Why Perl is more learnable than Haskell

Dan Mead
In reply to this post by Ryan Dickie
Ah... there really needs to be more literature written on switching to the functional paradigm, IMHO.

That is really these guys haven't had an easy time with it.

On 4/11/07, Ryan Dickie <[hidden email]> wrote:
I thought I could resist this thread but I'll bite =:-()

The first language i learned was basic. No real functions, simple step by step instructions. I then learned hypercard, c, c++, python, assembly, vhdl, and too many others!

Now i've decided to learn haskell. I view it as a mathematicians language. I do research in the field of medical imaging.. particularly processing large cardiac data sets to figure out characteristics, diseases, etc. Why workflow generally starts out as 1) mathematical idea 2) turn that pure equation into a numerical recipe 3) implement, debug 5) analyze 6) goto step 1. I find doing my thinking in the continous domain makes things a lot easier.

But here's where i differ from everyone else. I already have the mathematical relationships all nice and tidy (hopefully!) in my head before i start. I literally just implement it. I don't want to care about threading, IO, message passing, or numerical stability. I have to care about performance but only so far as it hampers my productivity. Preferably the language will do it implicitly.

Your average programmer wants a language to do tasks. Having to think about the math and relationships behind it all is rather sickening to them (and me too!).

I am a new haskell programmer (basically a week into it!). It is by far the hardest language i've had to pick up. A lot of my code could be structured in a functional way.. but almost all reply on looping techniques (would take a lot of work to rethink my gradient descent method and make it fast!).  Regardless of actually using haskell.. i like to transfer these techniques to c++. Before i even knew of haskell i knew some FP methods and i found that using these shrunk my code, shrunk the bugs, and did nice things for performance + concurrency. In fact, I just read a google paper on their batch system. They use to functions: map and reduce. They can easily split it up over their cluster etc... these are the ideas of FP that i like! That and the set-builder notation.

I also hate matlab to death. Is there any possibility of using haskell as a replacement using ghci? Mostly i care about linalg when it comes to using matlab.

ps: sorry if gmail butchered this reply. I had subscribed to the digest and turns out that was a mistake :D

_______________________________________________
Haskell-Cafe mailing list
[hidden email]
<a onclick="return top.js.OpenExtLink(window,event,this)" href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank"> http://www.haskell.org/mailman/listinfo/haskell-cafe



_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: Why Perl is more learnable than Haskell

Thomas Conway
In reply to this post by riccardo cagnasso
On 4/11/07, riccardo cagnasso <[hidden email]> wrote:
> If you first language is LISP probably you find easy Haskell and difficult
> pearl.

I must say I agree here. I spent 10 years programming in prolog before
I tried haskell. Most of my problems with haskell are because it has a
rather opaque performance model (e.g. when should you use tail
recursion, and when should you not). But I happily acknowledge that my
experience is probably atypical. ;-)

cheers,
T.
--
Dr Thomas Conway      You are beautiful; but learn to work,
[hidden email]         for you cannot eat your beauty.
                                              -- Congo proverb
_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
12345