[Haskell-cafe] Re: Functional programming for processing of large raster images

Bulat Ziganshin bulat.ziganshin at gmail.com
Wed Jun 21 06:45:11 EDT 2006


Hello Joel,

Wednesday, June 21, 2006, 1:24:05 PM, you wrote:

> I think the issue wasn't using functional programming for large image
> processing, it was using Haskell. OCaml is notoriously fast and  
> strict. Haskell/GHC is... lazy.

+1 :)

> Everyone knows that laziness is supposed to be a virtue. In practice,
> though, I'm one of the people who either can't wrap their heads  
> around it or just find themselves having to fight it from the start.

i think that i just don't notice cases where i use lazy evaluation in
Haskell, it just silently works. just for example - i have in my
program filelist which can contain, say, 100.000 files. it is splitted
to sublists by file extension and each sublist is splitted again to
100 items chunks. the each sub-sub-list is processed in inner cycle.
that is done via lazy list evaluation and i even don't think how this
actually works - for me it' just split+mapM_ combination

> Should we all switch to OCaml? I wish I had a criteria to determine
> when to use Haskell and when to use OCaml.

i never tried to work in it but i've read books. for me it's just too
irregular, uncomfortable language. from the theoretic point of
view, Haskell has some stronger facilities (because it was created
much later), such as polymorphic recursion and type classes. although
OCaml is much later than original ML and contains numerous extensions,
they are more pragmatic and not really integrated into the language (imho).
Haskell, on the other side, grows with new high-level concepts that
are moved from the academician fields right to the real work (say, STM
and GADT)

language-of-my-dream is strict Haskell with ability to explicitly
specify lazy evaluation on need. it was discussed on this list
several months ago (search for "strict Haskell"). one possibly
interesting variant of these "strict Haskell" can be Clean language -
it's also lazy by default, afaik, but contains better features to
specify strictness, compiler that generates fast code (at the level of
OCaml/jhc), plus IDE with GUI libs. comparing to Haskell, it seems
somewhat like "Visual Basic" comparing to plain Basic. again, i don't
tried it (and it's not free, afair), so look himself. it's a list of
files i downloaded from site but not yet tried. first is compiler,
other - docs (and it's a HUGE docs):

HsCleanAll2.0.2.zip [http://aszt.inf.elte.hu/~fun_ver/2003/software/HsCleanAll2.0.2.zip]
CleanBookI.pdf 1-up [ftp://ftp.cs.kun.nl/pub/Clean/papers/cleanbook/CleanBookI.pdf]
CleanBookI2up.pdf 2-up [ftp://ftp.cs.kun.nl/pub/Clean/papers/cleanbook/CleanBookI2up.pdf]
III.1.ProgramDevelopment.pdf pdf [ftp://ftp.cs.kun.nl/pub/Clean/papers/cleanbook/III.1.ProgramDevelopment.pdf]
III.2.ProgStylesParadigms.pdf pdf [ftp://ftp.cs.kun.nl/pub/Clean/papers/cleanbook/III.2.ProgStylesParadigms.pdf]
III.3.Efficiency.pdf pdf [ftp://ftp.cs.kun.nl/pub/Clean/papers/cleanbook/III.3.Efficiency.pdf]
object-io.pdf [ftp://ftp.cs.kun.nl/pub/Clean/supported/ObjectIO.1.2/doc/tutorial.pdf]



-- 
Best regards,
 Bulat                            mailto:Bulat.Ziganshin at gmail.com



More information about the Haskell-Cafe mailing list