Why is there so much (more) Haskell material?

Hello fairy camls,

While learning Ocaml I stumble upon many ideas (e.g. computations, purely functional datastructures, GADT) and teachers here know what more next, not to mention hordes of use cases (difference lists seen here a month ago ( adapted from haskell)).

Papers are referenced and many are written in Haskell rather than SML or Ocaml. Wadler has many references (at times in Ocaml) to quote a multi-lingual list. Even in french Ocaml courses, Haskell appear out of monad lessons (appropriate syntax ?). In general, googling most of functional terms returns a set of Haskell links.

Although lazily delaying it, at this point, I canā€™t postpone any longer and must learn Haskell syntax to access this literature.

I 'd like to know why is it as it is ? I mean, the brotherhood (Haskell, MLs) seems to lean towards Haskell when it comes to teaching or publications. Am I naively wrong on my corner of the internet ?

This led me to ponder about to translate everything in one another (growing and hard to maintain) or to learn many languages (hard )? Once I learn Haskell syntax why translate but use it elsewhere in Ocaml ?

Please donā€™t through me stones, I will never write anything in Haskell ever :smile:. Just touch it with the eyes.

4 Likes

Since Haskell is pure its practitioners have to solve problems the functional way. So naturally they get to invent a lot of the many great functional programming techniques (a good example of how constraints fosters creativity). With OCaml and SML itā€™s easier to work around and use an effect here and there to solve your problem ā€” but not necessarily.

I encourage you to learn enough Haskell to at least be able to read the papers. In fact if you already know OCaml itā€™s not that hard. But beware that if you try to directly translate their ideas to OCaml you might sometimes get caught by how their designs exploit the lazy evaluation strategy or use higher-kinded polymorphism (see this paper and that library for the latter).

7 Likes

Simply: because they have a bigger user community.

Iā€™ve kind of wondered why Haskell has a bigger user community than the MLs, honestly. B/c ā€¦ geez, to use ML, you really have to learn Hindley-Milner typing, and some about functional programming. But to use Haskell at all effectively, it seems like you have to learn a massive tower of stuff. I confess that at one point, I learned all that category theory nonsense (topoi, CCCs, NNOs, and on and on and on) but geez, the idea that working programmers have the brain space for all that just staggers me.

I donā€™t understand it myself.

4 Likes

Well, category theory recently got the attention from broader scientific community, not only the PL one.
See for example these:

2 Likes

Some smalltalk with Haskell may do indeed.

So far seminal and legendary publications I read hinge on something as elementary as core ML. Like lambda calculus + evaluation + (ad hoc) polymorphism. Itā€™s like yet another skin on an axiomatic skeleton. I dreaded a thicker coat of syntax but itā€™s minimal. Then again, only talking about syntax formalities. The moves go beyond chattering when I see their manners.

Perhaps learning Ocaml is more akin to learning Ocaml + lightweight Haskell.

Ho! thanks for this paper (itā€™s a true gem). Together with lazy.t (for DS) and (monadic let!) it comes in as a trojan horse in Hackage haha . Letā€™s go plunder.

1 Like

I like your honesty ! Hahaha

I, too, dread this very scary stuff lurking every monad away. But I donā€™t think it is obligatory to dig this far underneath the rabbit hole. There is a level of formal definitions that I canā€™t see matching my turing needs (let alone understand).

After I was introduced to my first monad, I started to see them here and there. Hence my teenage interest for the ML in "-ell ". And then you see more algebra patterns emerge around. Unlike a round object, our patterns are more like wiring and plumbing (I believe), schemes and logics abstracted (allegedly,). Whereas with stone objects you canā€™t tie knots, let alone weave a dress. And I just love that a lambda function just glues everything at all levels together. Not only does it bind but also shape-shifts everywhere. This is clay gods couldnā€™t think of. Weā€™re in a tie.

@XVilka (@dbuenzli) thanks for the links. Itā€™s valuable and I canā€™t tell you the time it takes to build a library crawling and sieving references.

Found this joke and this other joke and the quotes at the end. If one looks at the shape of oneā€™s code, abstracting takes you up a (loaded) node of your code tree. If you have a single leaf to program and aggressively build up a linear branch of abstraction nodes (in hope to fork them when haskell freezes over) you get a degenerate tree. A sort of pathological 1-balcony tower (the @Chet_Murthy tower) that gives a nice view but isnā€™t handy for watering your lilac.

Ocaml community tinkers semantic compression to the SLOC logarithm to get you actual programs. Makes approaching less daunting :slight_smile:

1 Like

Itā€™s ā€˜OCamlā€™, btw :wink:

Is there a particular resource that you like for this? Particularly for someone already reasonably fluent in OCaml?

That was quite sometime ago but I think I mainly perused Paul Hudakā€™s The Haskell School of Expression at the time.

The book ā€œreal world haskellā€ is good.
And you probably donā€™t need to read it all.
I felt it has a much broader coverage than ā€œreal world OCamlā€.

It sounds like youā€™re going to fit right in with Haskell!

2 Likes

I bet you are British, because of the special trace of humor. Excellent! :smiley:

Might also be a dad. Dad joke alert! :smiley:

I think OCAML is easier to use to build apps especially for unix related systems .

aha -ha ! At last , after craftily laying pun jokes begging to be read. A reader finally evaluates it. You sure never know in what comment order the laughter gets its actual value.

2 more to go, the joke thickens.

1 Like

This book is not bad also, for a quick introduction:
learnyouahaskell.com/chapters

:o thanks for reviewing it , I didnā€™t know were to dive in without becoming a bibliophibian. so next stop, after I get half way through category theory (I can because I am young).

After a painfull bibliography, I made up my mind on this book and then (not yet there) this other book which defines triples (monads), and then you can stop.

Itā€™s a very good textbook and It surprisingly fills me with plenty of joy from back in undergraduate mathematics. It tackles algebraā€™s of arrows. The read itself takes a long while. IMHO, totally worth the way of thinking presented.