[Haskell-cafe] Tutorial on Haskell

Thomas Hartman tphyahoo at gmail.com
Mon Apr 16 07:27:58 EDT 2007

There may be something to this point of view.

On the other hand, it is easier for me to see examples that can
connect back to something I am already familiar with.

That said, I will mention something where perl *seemed* to be a fit,
but later proved frustrating. To whit -- Doing something at the shell
level, in parallel. Ideally, in such a way that it could scale to, for
example, multiple processes on a multi processor box, or even
distributed map-reduce using a botnet.

I just couldn't figure out a good way to do this in perl, despite a
recently published map-reduce module to the CPAN. It all just seemed
to get icky. I couldn't "plug in" my bits of finished code in the way
I would have liked to, forking and other fiddly bits just seemed to
get in the way.

Now, this is probably largely due to my inexperience with "parallel"
thinking. However, I think part of it is also the limitations in the

My simple task was to download a bunch of urls. This could be done
with wget. What I got frustrated with was, speeding this up by doing
things in parallel. There are a number of modules on the CPAN that
purport to help with this... parallel fork manager... parallel web
user agent... others... but things got messy fast, even through the
core task (fetch a url) was extremely simple. That is something that
got me thinking.

So, an example to take a simple task (eg web fetch, but could be
something else), and then scale it to work in parallel -- with
threads, with map reduce, howsoever -- might be a good show of
haskell's strehgths. I think there was even a post to haskell cafe
about this today.

To recap: transform a piece of simple code that works in serial, so it
works in parallel. Maybe even a couple, or three ways: using forks,
using threads, using map reduce.

Compare and contrast this with doing the same transformation in perl.
Perl should be messier.

Hope this helps...

2007/4/16, Dougal Stanton <ithika at gmail.com>:
> On 16/04/07, Thomas Hartman <tphyahoo at gmail.com> wrote:
> > Maybe that could be simplified and something could be based on that.
> >
> > A one-liner using PCRE regex might also be of use.
> >
> Unless it can be performed with astounding dexterity, I don't think
> try to beat, for example, Perl at its own game will produce worthwhile
> results.
> What, instead, is Haskell's unique selling point? Non-strictness?
> Purity? Optional, composable, computation styles (ie, drop-in monads
> for non-determinism, continuations, state etc)? Succinct and elegant
> syntax? Something else?
> Cheers,
> D.
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe

More information about the Haskell-Cafe mailing list