Re: [Haskell-cafe] Haskell-Cafe Digest, Vol 217, Issue 16

"The seeds of your confusion are very evident from your message".
The seeds of your unsubstantiated assumptions about me are very
evident from yours.
"You can't just 'translate' an algorithm from OOP to Haskell"
Wow, I'm either "trying to translate Haskell to C++" (someone else,
above) or trying to translate C++ to Haskell.
I'm actually doing neither. I started by trying to understand this:
https://www.stwing.upenn.edu/~wlovas/hudak/aug.pdf
(And no, just because Haskell is great for writing little
special-purpose programming languages does not automatically mean it's
up to snuff for handling natural language.)
I'd originally hoped to fully understand the rather short program in
that paper (full code, in two versions, elsewhere on Paul Jones aca
dite) by getting it to run again, then commenting the code as I began
to understand it. And then, on to more important issues for a fuller
Haskell implementation, issues described here
https://www.aclweb.org/anthology/C94-2137.pdf
and here
http://www.lacus.org/volumes/23/22.sypniewski.pdf
Both of which are references I dug up and supplied here
https://en.wikipedia.org/wiki/Applicative_universal_grammar
as I took the Wikipedia article from stub status to something less
stubby -- it actually started in this state:
https://en.wikipedia.org/w/index.php?title=Applicative_universal_grammar&diff=prev&oldid=1020447173
The ASCII-art diagrams you see there are output from code that I've
gotten working again.
I learned about lazy evaluation in college, when I got interested in
how Lisp might implement it. I'm very familiar with the arguments for
purity, especially from learning Erlang some years ago (during which I
wrote my share of accumulator-based tail-recursive functions.) I
prefer static typing but hated the way C++ templates extended the
concept, mostly because the syntax error messages were so bad for so
long. My career includes a time in the late 80s when the kind of
computing power we have in our phones now with multicore processors
filled a box of hardware too heavy to lift. This was at a startup
where the founder was substantially inspired by this stream-oriented
single-assignment language:
https://en.wikipedia.org/wiki/SISAL
I started programming at 15. It's been a very rare year, even after
leaving the software profession, when I didn't write at least some
code, learning new things in the process. Which means I've been
looking at programming languages and how to implement things at the
most appropriate level of abstraction possible for just a few months
shy of fifty years.
The arguments here are following a familiar pattern, one I see in
discussions of everything from programming to government policy.
(1) I disagree with someone
(2) This person instantly assumes I must be ignorant of what they know
(3) They start Mansplaining It All To Me.
This is particularly irksome when the person is actually considerably
more ignorant of the subject than I am.
I'm still ignorant of most of Haskell, to be sure. However, I'm not
ignorant when it comes to writing. (Published articles on request.) A
great deal of what's written about Haskell, usually with very good
intentions, has proved useless to me. Have I had a stroke that leaves
me apparently unharmed, but actually no longer able to absorb a
different programming language? Was I always just too dumb to learn
Haskell? Somehow, I think it's more related to the writing.
To some extent the community seems to recognize there's a problem --
e.g., the Monad Tutorial Explosion. I finally got (most of?) what
monads really mean for practical programming when none other than
Simon Peyton-Jones said F# called a very similar construct "workflow,"
a word he likes. Wow, plain English instead of a mathematical
abstraction that, in the math introductions, looks weirdly clunky to
me, if anything, but, in any case, very hard to relate to writing
better code.
Lambda calculus? I have vague memories of Eugene Lawler
https://en.wikipedia.org/wiki/Eugene_Lawler
covering it when I took computing theory from him. And again, when I
was grading computing theory homework for this required course for
graduate students (for their prelim exams) for Richard Lipton
https://en.wikipedia.org/wiki/Richard_Lipton
in the fall term of 1980 at U.C. Berkeley.
It's not that I'm too stupid to learn lambda calculus. It's that I
seriously doubt that refreshing my memory on the details is going to
add significantly more to my grasp of functional programming in
Haskell.
I disagree with some people here. They jump to the conclusion that I'm
some ignorant moron. They also keep trying to sell Haskell as
something dramatically, fundamentally -- nay transcendentally! --
different from anything I've ever known.
Are you doing that? Stop. Just stop. Haskell's big problem right now
is adoption. And I'm telling you why adoption has been hard for me.
You lecture back, telling me things I already know, making sweeping
assumptions about me. When you do that, you're not part of the
solution to Haskell's biggest problem right now. You're part of the
problem.
Regards,
Michael Turner
Executive Director
Project Persephone
1-25-33 Takadanobaba
Shinjuku-ku Tokyo 169-0075
Mobile: +81 (90) 5203-8682
turner@projectpersephone.org
Understand - http://www.projectpersephone.org/
Join - http://www.facebook.com/groups/ProjectPersephone/
Donate - http://www.patreon.com/ProjectPersephone
Volunteer - https://github.com/ProjectPersephone
"Love does not consist in gazing at each other, but in looking outward
together in the same direction." -- Antoine de Saint-Exupéry
On Fri, Sep 17, 2021 at 4:19 AM
Send Haskell-Cafe mailing list submissions to haskell-cafe@haskell.org
To subscribe or unsubscribe via the World Wide Web, visit http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe or, via email, send a message with subject or body 'help' to haskell-cafe-request@haskell.org
You can reach the person managing the list at haskell-cafe-owner@haskell.org
When replying, please edit your Subject line so it is more specific than "Re: Contents of Haskell-Cafe digest..."
Today's Topics:
1. Re: Haskell's "historical futurism" needs better writing, not better tools (Richard Eisenberg) 2. Re: Haskell's "historical futurism" needs better writing, not better tools (Jeffrey Brown) 3. Re: Haskell's "historical futurism" needs better writing, not better tools (Gregory Guthrie) 4. Re: Bundle patterns with type aliases (Carter Schonwald) 5. Re: Bundle patterns with type aliases (David Feuer) 6. Re: Bundle patterns with type aliases (David Feuer)
----------------------------------------------------------------------
Message: 1 Date: Thu, 16 Sep 2021 14:05:19 +0000 From: Richard Eisenberg
To: Anthony Clayden Cc: haskell-cafe@haskell.org Subject: Re: [Haskell-cafe] Haskell's "historical futurism" needs better writing, not better tools Message-ID: <010f017beeed148e-35512a1d-0412-45c5-b1ac-ca532fa70f72-000000@us-east-2.amazonses.com> Content-Type: text/plain; charset="utf-8"
I just want to pipe up and say I'm not comfortable with this response. When I feel this way about writing on a forum, I normally contact the author in private, but I think posting publicly here has its merits. I'm hoping that the long correspondence AntC and I have had -- often with opposing viewpoints but with mutual respect -- with withstand this email.
Michael posted here expressing frustration with his experience learning and using Haskell. In my opinion, he has spent too much time reading older papers, written by experts for experts -- which Michael is not. I do not fault Michael for this: these resources are sometimes what appear when searching, and we as a community have done a poor job marshaling our educational resources. (Michael, I just thought of a resource you might find useful: http://dev.stephendiehl.com/hask/ is an oft-linked resource attempting to do that marshaling. I am not vouching for it here, per se, but I know others have found it useful.)
However, Michael very specifically said that "just learn lambda-calculus" was not helpful for him, and so I think it's unhelpful for someone to respond with "just learn lambda-calculus". There are a number of other statements in the email below which could be seen as belittling -- also not helpful.
Instead, I wish that we, as a community, could take posts like Michael's at face value: this is the experience of someone who wants to learn Haskell. While some of the conclusions stated in that post are misunderstandings, it is not the sole fault of the learner for these misunderstandings: instead, we must try to understand what about our community and posted materials induced these misunderstandings, and then seek to improve. Many people in Michael's situation may not have posted at all -- and so this kind of information can be very hard to get.
Michael, I have no silver bullet to offer to you to try to help you here. I do tend to agree with AntC that you have developed some misconceptions that are hindering your continued learning. The terminology actively hurts here. (To be fair, the first Haskell standard pre-dates both Java and C++, and so one could argue who got the terms wrong.) For my part, I am trying to help with this situation both by trying to improve error messages, and though my support of the Haskell Foundation's Haskell School initiative (https://github.com/haskellfoundation/HaskellSchool). These will take time to grow, but my hope is that a future person like you will have an easier route in.
In the meantime, I implore us to take all expressed experiences as exactly that: the experience of the person writing. And if they say they don't want X, please let's not feed them X. :)
Richard
On Sep 16, 2021, at 12:53 AM, Anthony Clayden
wrote: Hi Michael, oh dear, oh dear, oh dear.
The seeds of your confusion are very evident from your message. How to back you out of whatever deep rabbit-hole you've managed to get your head into?
... Your average reader (already a programmer) would be better served by a comparative approach: Here's how to say something in a couple of other programming languages, here's how to say something roughly equivalent in Haskell -- BUT, here's how it's subtly different in Haskell.
No. Just no. Haskell is not "subtly different" to (say) Java in the way that C++ or C# are different. (I'll leave others to judge how subtly different they are.)
Haskell is dramatically and fundamentally different. You can't just 'translate' an algorithm from OOP to Haskell. Many newbies try, and there's many tales of woe on StackOverflow. Just No.
I really don't know how you could have got any experience with Haskell and say "subtly".
I suggest you unlearn everything you think you know about Haskell, and strike out in an entirely different direction. The best approach would be to spend a few days playing with lambda calculus. (That's what I did before tackling Haskell.)
(I've actually been curtly informed on the beginners' list -- yes, the beginner' list! -- that my problems of comprehension can be solved simply: "Learn lambda calculus.")
Lambda calculus is an excellent place for beginners to start. What could be easier to learn? It's certainly easier than grokking a Turing machine; and much easier than Haskell: less than a handful of primitives yet can compute anything computable.
And since the concepts are seldom described in concrete enough and time-honored programming language terms (by comparison to other programming languages)
I'm guessing that the concepts you're talking of simply don't correspond to anything in time-honoured (procedural) programming. Anybody writing about Haskell (including anybody writing the User Guide) assumes a base level of understanding of Haskell. You've clearly veered off the track and haven't yet reached base. Remember the User Guide builds on top of the Language Report.
(On the point of 'time-honoured': lambda calculus is almost exactly the same age as Turing machines. The first well-known programming language using lambda-calculus ideas (LISP 1966) is almost exactly the same age as the first OOP language (Simula 1967). Which is the more time-honoured?)
You do have a point that the terminology in Haskell is often mysterious
[SPJ said] F# had settled on the term "workflow" instead of "monad", and he felt this was wise.
Yes many have yearned for a more warm-and-cuddly term than "monad". But the terminology barrier starts before that.
Haskell typeclasses are not 'classes' in any sense recognisable from OOP. There are no objects, no hidden state, no destructive assignment. We might go back to February 1988 when a strawman for what became typeclasses used OVERLOAD/INSTANCE.
AntC
_______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.

On Fri, Sep 17, 2021 at 01:43:01PM +0900, Michael Turner wrote:
I finally got (most of?) what monads really mean for practical programming when none other than Simon Peyton-Jones said F# called a very similar construct "workflow," a word he likes.
Was it literally just a single sentence introducing a new word for a concept that made you "get it"? Could you elaborate? This is really quite remarkable. Tom

On Sep 17, 2021, at 3:50 AM, Tom Ellis
wrote: On Fri, Sep 17, 2021 at 01:43:01PM +0900, Michael Turner wrote:
I finally got (most of?) what monads really mean for practical programming when none other than Simon Peyton-Jones said F# called a very similar construct "workflow," a word he likes.
Was it literally just a single sentence introducing a new word for a concept that made you "get it"? Could you elaborate? This is really quite remarkable.
For me, coming from a mostly Java background (but with a healthy dollop of functional programming thrown in the mix -- but no Haskell), the phrase that unlocked monads was "programmable semicolon". Richard

On Fri, Sep 17, 2021 at 05:02:09PM +0000, Richard Eisenberg wrote:
On Sep 17, 2021, at 3:50 AM, Tom Ellis
wrote: On Fri, Sep 17, 2021 at 01:43:01PM +0900, Michael Turner wrote:
I finally got (most of?) what monads really mean for practical programming when none other than Simon Peyton-Jones said F# called a very similar construct "workflow," a word he likes.
Was it literally just a single sentence introducing a new word for a concept that made you "get it"? Could you elaborate? This is really quite remarkable.
For me, coming from a mostly Java background (but with a healthy dollop of functional programming thrown in the mix -- but no Haskell), the phrase that unlocked monads was "programmable semicolon".
I'm curious what "unlock" means here. Do you mean you could understand the definition of the monad class after coming across "programmable semicolon" but not before? Or do you mean you understood the *purpose* of monads, but not necessarily how one would go about implementing them? Or something else?

I myself heard "programmable semicolon" sometime after monads had clicked for me, but I still appreciate it. To answer Tom's question, what these short single sentences do is explain the *purpose* of monads, which is really quite obscure at first. Listing sequential actions one after the other is so intuitive you see it everywhere. Take baking recipes as one example. Or assembly code. Or poems. Procedural programming languages let you use the same intuition for sequencing actions you've been using since you were carving hieroglyphics into obelisks. When a Haskeller says, "Monads are great! They let you chain effectful actions together!" it can take a very long time to understand they actually mean exactly what they're saying — the usual intuition is that sequencing actions can't possibly be a real problem, so you go round and round in circles trying to understand what "effectful" means, what "action" means, and how these oh-so-important "laws" have anything to do with it. A programmable semicolon cuts right to the truth: yes, really, functional programming had to work hard to solve *that* problem. I can understand why that viewpoint might be long-forgotten by those who were involved in the effort to solve it. :) And I appreciate that it was solved in such a general way that it can be applied to so many seemingly unrelated things! That's the beauty of mathematics! On Fri, 17 Sep 2021, 20.11 Tom Ellis, < tom-lists-haskell-cafe-2017@jaguarpaw.co.uk> wrote:
On Fri, Sep 17, 2021 at 05:02:09PM +0000, Richard Eisenberg wrote:
On Sep 17, 2021, at 3:50 AM, Tom Ellis < tom-lists-haskell-cafe-2017@jaguarpaw.co.uk> wrote:
On Fri, Sep 17, 2021 at 01:43:01PM +0900, Michael Turner wrote:
I finally got (most of?) what monads really mean for practical programming when none other than Simon Peyton-Jones said F# called a very similar construct "workflow," a word he likes.
Was it literally just a single sentence introducing a new word for a concept that made you "get it"? Could you elaborate? This is really quite remarkable.
For me, coming from a mostly Java background (but with a healthy dollop of functional programming thrown in the mix -- but no Haskell), the phrase that unlocked monads was "programmable semicolon".
I'm curious what "unlock" means here. Do you mean you could understand the definition of the monad class after coming across "programmable semicolon" but not before? Or do you mean you understood the *purpose* of monads, but not necessarily how one would go about implementing them? Or something else? _______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.

On Sep 17, 2021, at 1:11 PM, Tom Ellis
wrote: On Fri, Sep 17, 2021 at 05:02:09PM +0000, Richard Eisenberg wrote:
For me, coming from a mostly Java background (but with a healthy dollop of functional programming thrown in the mix -- but no Haskell), the phrase that unlocked monads was "programmable semicolon".
I'm curious what "unlock" means here.
It's hard to be sure, as this was ~10 years ago, but I think it was about motivation for me. Specifically: why do we need more than one monad, IO. I understood that Haskell functions were pure, and thus could produce no side effects. So we needed to have *some* way of having a program interact with the world. This way was the set of functions that work in the IO monad. These operations need a way of interacting with pure code (i.e. `return`) and some way of sequencing (i.e. >>=). This was all clear enough. What I didn't understand is why there was a typeclass to capture this or why we needed other monads -- until I associated "monad" with "programmable semicolon". At that point, I realized that the idea is very powerful. Richard
Do you mean you could understand the definition of the monad class after coming across "programmable semicolon" but not before? Or do you mean you understood the *purpose* of monads, but not necessarily how one would go about implementing them? Or something else? _______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.

On 19 Sep 2021, at 8:24 pm, Richard Eisenberg
wrote: This was all clear enough. What I didn't understand is why there was a typeclass to capture this or why we needed other monads -- until I associated "monad" with "programmable semicolon". At that point, I realized that the idea is very powerful.
Thus, e.g., the Hasql library (and of course also STM before that) leverage the ability to define a specialised Monad in which only specific "impure" actions are available to be able to "retry" a (Postgres Database in the case of Hasql) transaction, without worrying about side-effects persisting from the initial attempt. The Conduit and Streaming ecosystems are also testaments to the effectiveness of the abstraction. And then there's always State, which e.g. makes it possible to define mapAccumL and mapAccumR for all Traversable structures, or more generally thread an evolving through a sequence pure computations. Thus while there's reportedly been a shift lately from multi-layered Monad Transformer stacks to RIO or algebraic effect systems, Monads remain powerful and useful tools. I no longer remember exactly when they "clicked" for me, perhaps there wasn't any "Aha" moment. Just growing familiarity through multiple exposures to the many use-cases. Still haven't used "Cont" at all, so don't have any intuition for whether/when/how I might put it to good use... If someone wrote a good overview for that module, I'd be happy to learn more. -- Viktor.

On Fri, Sep 17, 2021 at 05:02:09PM +0000, Richard Eisenberg wrote:
Was it literally just a single sentence introducing a new word for a concept that made you "get it"? Could you elaborate? This is really quite remarkable.
For me, coming from a mostly Java background (but with a healthy dollop of functional programming thrown in the mix -- but no Haskell), the phrase that unlocked monads was "programmable semicolon".
No single exposition is optimal for all learners. Some are visual-spacial, others verbal-sequential, and there are likely other learning styles I've not heard of. Therefore, even with good writing, some readers will have to work harder at understanding the material than others, because they have to translate the explanations into a form that works for them. Also some readers are learning programming and Haskell at the same time, while others are experienced programmers, but not in Haskell or another ML-family or functional language. A reader far removed from the target audience of the writer may find a well written document largely unhelpful. There's no silver bullet. I haven't yet run into a "Haskell the language" book for experienced programmers that cuts to the chase and covers Haskell concisely a la K&R, focusing much more on the language than on how to write code (only as much code as it takes to minimally illustrate a language feature). Such a book would be challenging, because beyond writing basic numeric expresssions a large part of the language is needed all at once before one can write even some fairly simple functions. An off the cuff list of topics likely poorly ordered: * Basic expressions - Int, Word, Integer, Natural and Double - Infix operators, associativity and precedence, parentheses - Sections, (+), (.) and ($) - let and where - layout * Program structure - Function signature, head and body - patterns and pattern bindings - "case" and "if/then/else" - guards and pattern guards - modules, imports, and exports * User defined types - Algebraic data types, sums, products + Tuples + List (mention Array and Vector) + String (and mention Text) + Maybe + Either - Newtypes - Type aliases - GADTs - Existential types * More standard types - Array (immutable) - Vector (immutable) * Lazy evaluation and strictness - Space efficiency, seq and BangPatterns - ByteString strict, lazy and builders - Text strict, lazy and builders - Strict fields and StrictData * Type classes and constraints - Integral - Monoid - Semigroup - Foldable + Strict and lazy folds * Functors, Monads and Applicatives - State and IO Monads - map, fmap and ap - File I/O - Streaming - Applicative option parsing? * IO, ST and mutable values - MVector - MArray ... lots more ... before long we have a book that's considerably larger than K&R. This then leads to some frustration for the experienced programmer impatient to learn the basics of the language and get productive right away without relearning too much from the ground up. But then perhaps even modern C++ or Java has a rather non-trivial learning curve if one is starting from K&R C. There may not be a book that reasonably efficiently brings an experienced non-Haskell programmer to minimal proficiency, and the separation of pure functions from I/O means having to learn abstractions that don't come up in most other languages. For me, the journey was worth it, and the right book would surely have helped, (and would still help, I am far from the summit) but in the end it still takes effort and time. -- Viktor. P.S. Re: mental models of monads: Personally [verbal sequential], I find strained analogies unhelpful and distracting, so no desk clerks shuffling forms for me. I internalised Haskell monads, by implementing the Functor, Applicative and Monad instances for Reader and State a few times from scratch. Once those were solid, ReaderT and StateT and their MonadTrans instances. Unsurpsingly, I have a mental model built around sequencing of internal state updates while passing data from one state to use in choosing the next state transition. I do appreciate "programmable semicolon", but only *after* getting a more concrete intituition for the standard examples.

On Fri, Sep 17, 2021 at 03:47:19PM -0400, Viktor Dukhovni wrote:
I haven't yet run into a "Haskell the language" book for experienced programmers that cuts to the chase and covers Haskell concisely a la K&R, focusing much more on the language than on how to write code (only as much code as it takes to minimally illustrate a language feature).
The Haskell Report is a good start.

On Fri, Sep 17, 2021 at 09:14:23PM +0100, Tom Ellis wrote:
On Fri, Sep 17, 2021 at 03:47:19PM -0400, Viktor Dukhovni wrote:
I haven't yet run into a "Haskell the language" book for experienced programmers that cuts to the chase and covers Haskell concisely a la K&R, focusing much more on the language than on how to write code (only as much code as it takes to minimally illustrate a language feature).
The Haskell Report is a good start.
I agree that the report is a useful reference, but it is a specification, not a book from which to learn the language. I wouldn't actually suggest that anyone learn C by reading the C11 specication, or Haskell by working their way through the report. The report would of course be a useful source of topics and material for a Haskell the language book. -- Viktor.

The Report is also a bit outdated in spots. Along with outdated library
info, there's also a very old polymorphic recursion enhancement in GHC (and
I believe also Hugs and other defunct implementations) that should've been
added to Haskell 2010 but wasn't.
On Fri, Sep 17, 2021, 4:42 PM Viktor Dukhovni
On Fri, Sep 17, 2021 at 09:14:23PM +0100, Tom Ellis wrote:
On Fri, Sep 17, 2021 at 03:47:19PM -0400, Viktor Dukhovni wrote:
I haven't yet run into a "Haskell the language" book for experienced programmers that cuts to the chase and covers Haskell concisely a la K&R, focusing much more on the language than on how to write code (only as much code as it takes to minimally illustrate a language feature).
The Haskell Report is a good start.
I agree that the report is a useful reference, but it is a specification, not a book from which to learn the language. I wouldn't actually suggest that anyone learn C by reading the C11 specication, or Haskell by working their way through the report.
The report would of course be a useful source of topics and material for a Haskell the language book.
-- Viktor. _______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.

On Fri, Sep 17, 2021 at 04:39:15PM -0400, Viktor Dukhovni wrote:
On Fri, Sep 17, 2021 at 09:14:23PM +0100, Tom Ellis wrote:
On Fri, Sep 17, 2021 at 03:47:19PM -0400, Viktor Dukhovni wrote:
I haven't yet run into a "Haskell the language" book for experienced programmers that cuts to the chase and covers Haskell concisely a la K&R, focusing much more on the language than on how to write code (only as much code as it takes to minimally illustrate a language feature).
The Haskell Report is a good start.
I agree that the report is a useful reference, but it is a specification, not a book from which to learn the language. I wouldn't actually suggest that anyone learn C by reading the C11 specication, or Haskell by working their way through the report.
My memory of K&R may be deceiving me, but I seem to recall it is a lot closer to the Haskell Report than the C11 standard is. I would be interested in the opinion of others who have read these documents more recently.

I started learning Haskell by reading the Report, and I warmly recommend
that strategy. In particular, I just skipped over the terminology that
didn't make sense to me yet, and I didn't try too hard to keep the big
picture in my head (suggestion to future versions: put all the BNF diagrams
in the same place!)
Even with a rudimentary read-through, I was already advanced beyond the
likes of LYAH and ready to start running simple programs in ghci. Even
today I sometimes know things about syntax that surprise my colleagues.
I didn't need to know monads yet. The build tool challenges were a bigger
stumbling block at that point.
But best of all, I was familiar with the reference material, so I could
easily go back and reread things when necessary!
On Fri, 17 Sep 2021, 23.40 Viktor Dukhovni,
On Fri, Sep 17, 2021 at 09:14:23PM +0100, Tom Ellis wrote:
On Fri, Sep 17, 2021 at 03:47:19PM -0400, Viktor Dukhovni wrote:
I haven't yet run into a "Haskell the language" book for experienced programmers that cuts to the chase and covers Haskell concisely a la K&R, focusing much more on the language than on how to write code (only as much code as it takes to minimally illustrate a language feature).
The Haskell Report is a good start.
I agree that the report is a useful reference, but it is a specification, not a book from which to learn the language. I wouldn't actually suggest that anyone learn C by reading the C11 specication, or Haskell by working their way through the report.
The report would of course be a useful source of topics and material for a Haskell the language book.
-- Viktor. _______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.

Seconded. This worked for me also as a good starting point. The report is quite readable. On 2021-09-18 12:15 +0300, Bryan Richter wrote:
I started learning Haskell by reading the Report, and I warmly recommend that strategy. In particular, I just skipped over the terminology that didn't make sense to me yet, and I didn't try too hard to keep the big picture in my head (suggestion to future versions: put all the BNF diagrams in the same place!)
Even with a rudimentary read-through, I was already advanced beyond the likes of LYAH and ready to start running simple programs in ghci. Even today I sometimes know things about syntax that surprise my colleagues.
I didn't need to know monads yet. The build tool challenges were a bigger stumbling block at that point.
But best of all, I was familiar with the reference material, so I could easily go back and reread things when necessary!
On Fri, 17 Sep 2021, 23.40 Viktor Dukhovni,
wrote: On Fri, Sep 17, 2021 at 09:14:23PM +0100, Tom Ellis wrote: > On Fri, Sep 17, 2021 at 03:47:19PM -0400, Viktor Dukhovni wrote: > > I haven't yet run into a "Haskell the language" book for experienced > > programmers that cuts to the chase and covers Haskell concisely a la > > K&R, focusing much more on the language than on how to write code (only > > as much code as it takes to minimally illustrate a language feature). > > The Haskell Report is a good start.
I agree that the report is a useful reference, but it is a specification, not a book from which to learn the language. I wouldn't actually suggest that anyone learn C by reading the C11 specication, or Haskell by working their way through the report.
The report would of course be a useful source of topics and material for a Haskell the language book.
-- Viktor. _______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.
_______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.

Am 17.09.21 um 21:47 schrieb Viktor Dukhovni:
Personally [verbal sequential], I find strained analogies unhelpful and distracting, so no desk clerks shuffling forms for me.
I internalised Haskell monads, by implementing the Functor, Applicative and Monad instances for Reader and State a few times from scratch. Once those were solid, ReaderT and StateT and their MonadTrans instances.
Unsurpsingly, I have a mental model built around sequencing of internal state updates while passing data from one state to use in choosing the next state transition.
I have been finding the Monad expositions misleading - that idea that monads are for sequencing or transitions or mutable state always felt wrong to me, since the monad laws don't talk about any of these things at all. And as far as I could understand the concept, monads are not about state, they're about "composing a linear sequence of functions". The functions' types need not be the same (that would degenerate into the concept of associativity), but the result type of one function must be the parameter type of the next. The monad can do whatever it likes with the functions - typically, wrap them in some other function and construct a function composition; there isn't much else you can do with them, though you're not doing much justice to the Maybe monad if you see it as a pipeline. Ah... right... and of course the pseudo associativity. I.e. it doesn't matter what parts of the total sequence you construct first. Of course, state transitions are a fine application of this concept. Or anything else where you see a function as a computation step and you want to run these steps in sequence. It's just that there are more kinds of monads. Except if you see Maybe as "do these operations in sequence until you hit the first that returns None, then abort". It depends on seeing functions as executable things though, and that's not really what Haskell is trying to be (or was trying to be 20 years ago, maybe everybody is now happy that Haskel finally can express imperative stuff via monads... no idea what people think) Regards, Jo

I suspect a lot of people were pleased that they'd finally gotten rid of
lazy Result -> Request.
On Fri, Sep 17, 2021 at 4:34 PM Joachim Durchholz
Am 17.09.21 um 21:47 schrieb Viktor Dukhovni:
Personally [verbal sequential], I find strained analogies unhelpful and distracting, so no desk clerks shuffling forms for me.
I internalised Haskell monads, by implementing the Functor, Applicative and Monad instances for Reader and State a few times from scratch. Once those were solid, ReaderT and StateT and their MonadTrans instances.
Unsurpsingly, I have a mental model built around sequencing of internal state updates while passing data from one state to use in choosing the next state transition.
I have been finding the Monad expositions misleading - that idea that monads are for sequencing or transitions or mutable state always felt wrong to me, since the monad laws don't talk about any of these things at all.
And as far as I could understand the concept, monads are not about state, they're about "composing a linear sequence of functions". The functions' types need not be the same (that would degenerate into the concept of associativity), but the result type of one function must be the parameter type of the next. The monad can do whatever it likes with the functions - typically, wrap them in some other function and construct a function composition; there isn't much else you can do with them, though you're not doing much justice to the Maybe monad if you see it as a pipeline. Ah... right... and of course the pseudo associativity. I.e. it doesn't matter what parts of the total sequence you construct first.
Of course, state transitions are a fine application of this concept. Or anything else where you see a function as a computation step and you want to run these steps in sequence. It's just that there are more kinds of monads. Except if you see Maybe as "do these operations in sequence until you hit the first that returns None, then abort". It depends on seeing functions as executable things though, and that's not really what Haskell is trying to be (or was trying to be 20 years ago, maybe everybody is now happy that Haskel finally can express imperative stuff via monads... no idea what people think)
Regards, Jo _______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.
-- brandon s allbery kf8nh allbery.b@gmail.com

On Fri, Sep 17, 2021 at 10:29:41PM +0200, Joachim Durchholz wrote:
Unsurpsingly, I have a mental model built around sequencing of internal state updates while passing data from one state to use in choosing the next state transition.
I have been finding the Monad expositions misleading - that idea that monads are for sequencing or transitions or mutable state always felt wrong to me, since the monad laws don't talk about any of these things at all.
That's the nature of mental models, they're first approximations with possible refinements. Yes, there are monads for which State is a poor analogy. The `Cont` monad comes to mind, one needs to "think different" when reasoning about `callCC`, `shift` and `reset` `State` as a mental model for monads captures basic sequencing with possible internal "effects" well enough to be a reasonable first approximation. Already with List exploring all possible paths the fit is not ideal. -- Viktor.

On Fri, Sep 17, 2021 at 3:52 PM Viktor Dukhovni
No single exposition is optimal for all learners. Some are visual-spacial, others verbal-sequential, and there are likely other learning styles I've not heard of.
If you'll forgive the slight argumentativeness, I do want to point out, as someone who follows education research quite a bit, that this learning styles hypothesis is a pretty well-known myth. It sounds good and feels true, but has been falsified every time someone has tried to gather evidence to validate it. There are some related statements that are true. For example, different people certainly have different preferences for modes of presentation, but those preferences don't actually correlate with how well they learn. Feeling confused or unsatisfied doesn't mean you're not learning! For another example, people definitely do learn better when they see information from several different points of view, but it's apparently not because different people learn best from different points of view, but rather because all people learn best when they have more different perspectives to integrate. And for a last example, people definitely do have preferences and abilities for learning different kinds of content, which are in turn most naturally communicated in certain ways, but it's apparently the natural way to present an idea that matters more in terms of learning, not the individual's preferences for style. This is actually pretty related to what we're talking about here. If it were true that different people understand monads better when they are presented in ways that match the individual's style of learning, reliable evidence of this would be revolutionary in education research. (Meaning: it's very, very likely not to be true, though I cannot point to research that studies understanding monads, in particular.) But luckily, the solution to this myth is just *not* to differentiate, but rather to provide all of these points of view to everyone who is learning, whether they *feel* that this is the right presentation or it *feels* like it's making sense to them or not. When evaluating our own learning experiences, we should be careful to remember that the times we were learning were probably actually the times we felt a bit confused. The presentation that finally made sense probably wasn't the most helpful one. See https://www.google.com/search?q=learning+styles+myth for lots of sources.

I agree with improving teaching/learning materials. But here is a small point I object to: On 2021-09-17 3:47 p.m., Viktor Dukhovni wrote:
On Fri, Sep 17, 2021 at 05:02:09PM +0000, Richard Eisenberg wrote:
No single exposition is optimal for all learners. Some are visual-spacial, others verbal-sequential, and there are likely other learning styles I've not heard of.
Please consult for example https://www.youtube.com/watch?v=rhgwIhB58PA It is long past high time to kill that outdated zombie myth. What I stand behind is: Every student needs every perspective they can get their hands on. But it is not because every student is only good at just one thing.

Haskell's big problem right now is adoption.
I'm not quite sure this is a problem. Haskell and its libraries are designed around math concepts, as opposed to CS concepts (semigroup vs IConcatenable). Learning it all but requires learning some algebra as well, thus a lower adoption rate is expected. Personally, I consider this math requirement a great educational benefit: raising the level of abstraction from "container" to "monoid" helps to make better design decisions. It may be an obstacle for someone who wants quickly put together a new product, but this is the wrong tool selected for a job. A book like "Category theory for programmers" (that exists) and "Algebra for programmers" (that I don't know about) may help with learning and provide practical examples, but explaining math without using math words sounds like a futile attempt. On Fri, Sep 17, 2021 at 12:58 AM Michael Turner < michael.eugene.turner@gmail.com> wrote:
"The seeds of your confusion are very evident from your message".
The seeds of your unsubstantiated assumptions about me are very evident from yours.
"You can't just 'translate' an algorithm from OOP to Haskell"
Wow, I'm either "trying to translate Haskell to C++" (someone else, above) or trying to translate C++ to Haskell.
I'm actually doing neither. I started by trying to understand this:
https://www.stwing.upenn.edu/~wlovas/hudak/aug.pdf
(And no, just because Haskell is great for writing little special-purpose programming languages does not automatically mean it's up to snuff for handling natural language.)
I'd originally hoped to fully understand the rather short program in that paper (full code, in two versions, elsewhere on Paul Jones aca dite) by getting it to run again, then commenting the code as I began to understand it. And then, on to more important issues for a fuller Haskell implementation, issues described here
https://www.aclweb.org/anthology/C94-2137.pdf
and here
http://www.lacus.org/volumes/23/22.sypniewski.pdf
Both of which are references I dug up and supplied here
https://en.wikipedia.org/wiki/Applicative_universal_grammar
as I took the Wikipedia article from stub status to something less stubby -- it actually started in this state:
https://en.wikipedia.org/w/index.php?title=Applicative_universal_grammar&diff=prev&oldid=1020447173
The ASCII-art diagrams you see there are output from code that I've gotten working again.
I learned about lazy evaluation in college, when I got interested in how Lisp might implement it. I'm very familiar with the arguments for purity, especially from learning Erlang some years ago (during which I wrote my share of accumulator-based tail-recursive functions.) I prefer static typing but hated the way C++ templates extended the concept, mostly because the syntax error messages were so bad for so long. My career includes a time in the late 80s when the kind of computing power we have in our phones now with multicore processors filled a box of hardware too heavy to lift. This was at a startup where the founder was substantially inspired by this stream-oriented single-assignment language:
https://en.wikipedia.org/wiki/SISAL
I started programming at 15. It's been a very rare year, even after leaving the software profession, when I didn't write at least some code, learning new things in the process. Which means I've been looking at programming languages and how to implement things at the most appropriate level of abstraction possible for just a few months shy of fifty years.
The arguments here are following a familiar pattern, one I see in discussions of everything from programming to government policy.
(1) I disagree with someone (2) This person instantly assumes I must be ignorant of what they know (3) They start Mansplaining It All To Me.
This is particularly irksome when the person is actually considerably more ignorant of the subject than I am.
I'm still ignorant of most of Haskell, to be sure. However, I'm not ignorant when it comes to writing. (Published articles on request.) A great deal of what's written about Haskell, usually with very good intentions, has proved useless to me. Have I had a stroke that leaves me apparently unharmed, but actually no longer able to absorb a different programming language? Was I always just too dumb to learn Haskell? Somehow, I think it's more related to the writing.
To some extent the community seems to recognize there's a problem -- e.g., the Monad Tutorial Explosion. I finally got (most of?) what monads really mean for practical programming when none other than Simon Peyton-Jones said F# called a very similar construct "workflow," a word he likes. Wow, plain English instead of a mathematical abstraction that, in the math introductions, looks weirdly clunky to me, if anything, but, in any case, very hard to relate to writing better code.
Lambda calculus? I have vague memories of Eugene Lawler
https://en.wikipedia.org/wiki/Eugene_Lawler
covering it when I took computing theory from him. And again, when I was grading computing theory homework for this required course for graduate students (for their prelim exams) for Richard Lipton
https://en.wikipedia.org/wiki/Richard_Lipton
in the fall term of 1980 at U.C. Berkeley.
It's not that I'm too stupid to learn lambda calculus. It's that I seriously doubt that refreshing my memory on the details is going to add significantly more to my grasp of functional programming in Haskell.
I disagree with some people here. They jump to the conclusion that I'm some ignorant moron. They also keep trying to sell Haskell as something dramatically, fundamentally -- nay transcendentally! -- different from anything I've ever known.
Are you doing that? Stop. Just stop. Haskell's big problem right now is adoption. And I'm telling you why adoption has been hard for me. You lecture back, telling me things I already know, making sweeping assumptions about me. When you do that, you're not part of the solution to Haskell's biggest problem right now. You're part of the problem.
Regards, Michael Turner Executive Director Project Persephone 1-25-33 Takadanobaba Shinjuku-ku Tokyo 169-0075 Mobile: +81 (90) 5203-8682 turner@projectpersephone.org
Understand - http://www.projectpersephone.org/ Join - http://www.facebook.com/groups/ProjectPersephone/ Donate - http://www.patreon.com/ProjectPersephone Volunteer - https://github.com/ProjectPersephone
"Love does not consist in gazing at each other, but in looking outward together in the same direction." -- Antoine de Saint-Exupéry
On Fri, Sep 17, 2021 at 4:19 AM
wrote: Send Haskell-Cafe mailing list submissions to haskell-cafe@haskell.org
To subscribe or unsubscribe via the World Wide Web, visit http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe or, via email, send a message with subject or body 'help' to haskell-cafe-request@haskell.org
You can reach the person managing the list at haskell-cafe-owner@haskell.org
When replying, please edit your Subject line so it is more specific than "Re: Contents of Haskell-Cafe digest..."
Today's Topics:
1. Re: Haskell's "historical futurism" needs better writing, not better tools (Richard Eisenberg) 2. Re: Haskell's "historical futurism" needs better writing, not better tools (Jeffrey Brown) 3. Re: Haskell's "historical futurism" needs better writing, not better tools (Gregory Guthrie) 4. Re: Bundle patterns with type aliases (Carter Schonwald) 5. Re: Bundle patterns with type aliases (David Feuer) 6. Re: Bundle patterns with type aliases (David Feuer)
----------------------------------------------------------------------
Message: 1 Date: Thu, 16 Sep 2021 14:05:19 +0000 From: Richard Eisenberg
To: Anthony Clayden Cc: haskell-cafe@haskell.org Subject: Re: [Haskell-cafe] Haskell's "historical futurism" needs better writing, not better tools Message-ID: < 010f017beeed148e-35512a1d-0412-45c5-b1ac-ca532fa70f72-000000@us-east-2.amazonses.com
Content-Type: text/plain; charset="utf-8"
I just want to pipe up and say I'm not comfortable with this response.
When I feel this way about writing on a forum, I normally contact the author in private, but I think posting publicly here has its merits. I'm hoping that the long correspondence AntC and I have had -- often with opposing viewpoints but with mutual respect -- with withstand this email.
Michael posted here expressing frustration with his experience learning
and using Haskell. In my opinion, he has spent too much time reading older papers, written by experts for experts -- which Michael is not. I do not fault Michael for this: these resources are sometimes what appear when searching, and we as a community have done a poor job marshaling our educational resources. (Michael, I just thought of a resource you might find useful: http://dev.stephendiehl.com/hask/ is an oft-linked resource attempting to do that marshaling. I am not vouching for it here, per se, but I know others have found it useful.)
However, Michael very specifically said that "just learn
lambda-calculus" was not helpful for him, and so I think it's unhelpful for someone to respond with "just learn lambda-calculus". There are a number of other statements in the email below which could be seen as belittling -- also not helpful.
Instead, I wish that we, as a community, could take posts like Michael's
at face value: this is the experience of someone who wants to learn Haskell. While some of the conclusions stated in that post are misunderstandings, it is not the sole fault of the learner for these misunderstandings: instead, we must try to understand what about our community and posted materials induced these misunderstandings, and then seek to improve. Many people in Michael's situation may not have posted at all -- and so this kind of information can be very hard to get.
Michael, I have no silver bullet to offer to you to try to help you
here. I do tend to agree with AntC that you have developed some misconceptions that are hindering your continued learning. The terminology actively hurts here. (To be fair, the first Haskell standard pre-dates both Java and C++, and so one could argue who got the terms wrong.) For my part, I am trying to help with this situation both by trying to improve error messages, and though my support of the Haskell Foundation's Haskell School initiative (https://github.com/haskellfoundation/HaskellSchool). These will take time to grow, but my hope is that a future person like you will have an easier route in.
In the meantime, I implore us to take all expressed experiences as
exactly that: the experience of the person writing. And if they say they don't want X, please let's not feed them X. :)
Richard
On Sep 16, 2021, at 12:53 AM, Anthony Clayden <
Hi Michael, oh dear, oh dear, oh dear.
The seeds of your confusion are very evident from your message. How to
back you out of whatever deep rabbit-hole you've managed to get your head into?
... Your average reader (already a programmer) would be better
served by a comparative approach: Here's how to say something in a couple of other programming languages, here's how to say something roughly equivalent in Haskell -- BUT, here's how it's subtly different in Haskell.
No. Just no. Haskell is not "subtly different" to (say) Java in the
way that C++ or C# are different. (I'll leave others to judge how subtly different they are.)
Haskell is dramatically and fundamentally different. You can't just
'translate' an algorithm from OOP to Haskell. Many newbies try, and there's many tales of woe on StackOverflow. Just No.
I really don't know how you could have got any experience with Haskell
and say "subtly".
I suggest you unlearn everything you think you know about Haskell, and
strike out in an entirely different direction. The best approach would be to spend a few days playing with lambda calculus. (That's what I did before tackling Haskell.)
(I've actually been curtly informed on the beginners' list -- yes,
Lambda calculus is an excellent place for beginners to start. What
could be easier to learn? It's certainly easier than grokking a Turing machine; and much easier than Haskell: less than a handful of primitives yet can compute anything computable.
And since the concepts are seldom described in concrete enough and
time-honored programming language terms (by comparison to other programming languages)
I'm guessing that the concepts you're talking of simply don't
correspond to anything in time-honoured (procedural) programming. Anybody writing about Haskell (including anybody writing the User Guide) assumes a
(On the point of 'time-honoured': lambda calculus is almost exactly
anthony.d.clayden@gmail.com> wrote: the beginner' list! -- that my problems of comprehension can be solved simply: "Learn lambda calculus.") base level of understanding of Haskell. You've clearly veered off the track and haven't yet reached base. Remember the User Guide builds on top of the Language Report. the same age as Turing machines. The first well-known programming language using lambda-calculus ideas (LISP 1966) is almost exactly the same age as the first OOP language (Simula 1967). Which is the more time-honoured?)
You do have a point that the terminology in Haskell is often mysterious
[SPJ said] F# had settled on the term "workflow" instead of "monad",
and he felt this was wise.
Yes many have yearned for a more warm-and-cuddly term than "monad".
But the terminology barrier starts before that.
Haskell typeclasses are not 'classes' in any sense recognisable from
OOP. There are no objects, no hidden state, no destructive assignment. We might go back to February 1988 when a strawman for what became typeclasses used OVERLOAD/INSTANCE.
AntC
_______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.

Thank you for the link to the paper. It's heading out to the printer now.
On a quick skim, it seems closely related to "Categorial Grammar".
"Categorial grammar is a family of formalisms in natural language
syntax which share the central assumption that syntactic constituents
combine as functions and arguments." -- Wikipedia
On Fri, 17 Sept 2021 at 16:52, Michael Turner
"The seeds of your confusion are very evident from your message".
The seeds of your unsubstantiated assumptions about me are very evident from yours.
"You can't just 'translate' an algorithm from OOP to Haskell"
Wow, I'm either "trying to translate Haskell to C++" (someone else, above) or trying to translate C++ to Haskell.
I'm actually doing neither. I started by trying to understand this:
https://www.stwing.upenn.edu/~wlovas/hudak/aug.pdf
(And no, just because Haskell is great for writing little special-purpose programming languages does not automatically mean it's up to snuff for handling natural language.)
I'd originally hoped to fully understand the rather short program in that paper (full code, in two versions, elsewhere on Paul Jones aca dite) by getting it to run again, then commenting the code as I began to understand it. And then, on to more important issues for a fuller Haskell implementation, issues described here
https://www.aclweb.org/anthology/C94-2137.pdf
and here
http://www.lacus.org/volumes/23/22.sypniewski.pdf
Both of which are references I dug up and supplied here
https://en.wikipedia.org/wiki/Applicative_universal_grammar
as I took the Wikipedia article from stub status to something less stubby -- it actually started in this state:
https://en.wikipedia.org/w/index.php?title=Applicative_universal_grammar&diff=prev&oldid=1020447173
The ASCII-art diagrams you see there are output from code that I've gotten working again.
I learned about lazy evaluation in college, when I got interested in how Lisp might implement it. I'm very familiar with the arguments for purity, especially from learning Erlang some years ago (during which I wrote my share of accumulator-based tail-recursive functions.) I prefer static typing but hated the way C++ templates extended the concept, mostly because the syntax error messages were so bad for so long. My career includes a time in the late 80s when the kind of computing power we have in our phones now with multicore processors filled a box of hardware too heavy to lift. This was at a startup where the founder was substantially inspired by this stream-oriented single-assignment language:
https://en.wikipedia.org/wiki/SISAL
I started programming at 15. It's been a very rare year, even after leaving the software profession, when I didn't write at least some code, learning new things in the process. Which means I've been looking at programming languages and how to implement things at the most appropriate level of abstraction possible for just a few months shy of fifty years.
The arguments here are following a familiar pattern, one I see in discussions of everything from programming to government policy.
(1) I disagree with someone (2) This person instantly assumes I must be ignorant of what they know (3) They start Mansplaining It All To Me.
This is particularly irksome when the person is actually considerably more ignorant of the subject than I am.
I'm still ignorant of most of Haskell, to be sure. However, I'm not ignorant when it comes to writing. (Published articles on request.) A great deal of what's written about Haskell, usually with very good intentions, has proved useless to me. Have I had a stroke that leaves me apparently unharmed, but actually no longer able to absorb a different programming language? Was I always just too dumb to learn Haskell? Somehow, I think it's more related to the writing.
To some extent the community seems to recognize there's a problem -- e.g., the Monad Tutorial Explosion. I finally got (most of?) what monads really mean for practical programming when none other than Simon Peyton-Jones said F# called a very similar construct "workflow," a word he likes. Wow, plain English instead of a mathematical abstraction that, in the math introductions, looks weirdly clunky to me, if anything, but, in any case, very hard to relate to writing better code.
Lambda calculus? I have vague memories of Eugene Lawler
https://en.wikipedia.org/wiki/Eugene_Lawler
covering it when I took computing theory from him. And again, when I was grading computing theory homework for this required course for graduate students (for their prelim exams) for Richard Lipton
https://en.wikipedia.org/wiki/Richard_Lipton
in the fall term of 1980 at U.C. Berkeley.
It's not that I'm too stupid to learn lambda calculus. It's that I seriously doubt that refreshing my memory on the details is going to add significantly more to my grasp of functional programming in Haskell.
I disagree with some people here. They jump to the conclusion that I'm some ignorant moron. They also keep trying to sell Haskell as something dramatically, fundamentally -- nay transcendentally! -- different from anything I've ever known.
Are you doing that? Stop. Just stop. Haskell's big problem right now is adoption. And I'm telling you why adoption has been hard for me. You lecture back, telling me things I already know, making sweeping assumptions about me. When you do that, you're not part of the solution to Haskell's biggest problem right now. You're part of the problem.
Regards, Michael Turner Executive Director Project Persephone 1-25-33 Takadanobaba Shinjuku-ku Tokyo 169-0075 Mobile: +81 (90) 5203-8682 turner@projectpersephone.org
Understand - http://www.projectpersephone.org/ Join - http://www.facebook.com/groups/ProjectPersephone/ Donate - http://www.patreon.com/ProjectPersephone Volunteer - https://github.com/ProjectPersephone
"Love does not consist in gazing at each other, but in looking outward together in the same direction." -- Antoine de Saint-Exupéry
On Fri, Sep 17, 2021 at 4:19 AM
wrote: Send Haskell-Cafe mailing list submissions to haskell-cafe@haskell.org
To subscribe or unsubscribe via the World Wide Web, visit http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe or, via email, send a message with subject or body 'help' to haskell-cafe-request@haskell.org
You can reach the person managing the list at haskell-cafe-owner@haskell.org
When replying, please edit your Subject line so it is more specific than "Re: Contents of Haskell-Cafe digest..."
Today's Topics:
1. Re: Haskell's "historical futurism" needs better writing, not better tools (Richard Eisenberg) 2. Re: Haskell's "historical futurism" needs better writing, not better tools (Jeffrey Brown) 3. Re: Haskell's "historical futurism" needs better writing, not better tools (Gregory Guthrie) 4. Re: Bundle patterns with type aliases (Carter Schonwald) 5. Re: Bundle patterns with type aliases (David Feuer) 6. Re: Bundle patterns with type aliases (David Feuer)
----------------------------------------------------------------------
Message: 1 Date: Thu, 16 Sep 2021 14:05:19 +0000 From: Richard Eisenberg
To: Anthony Clayden Cc: haskell-cafe@haskell.org Subject: Re: [Haskell-cafe] Haskell's "historical futurism" needs better writing, not better tools Message-ID: <010f017beeed148e-35512a1d-0412-45c5-b1ac-ca532fa70f72-000000@us-east-2.amazonses.com> Content-Type: text/plain; charset="utf-8"
I just want to pipe up and say I'm not comfortable with this response. When I feel this way about writing on a forum, I normally contact the author in private, but I think posting publicly here has its merits. I'm hoping that the long correspondence AntC and I have had -- often with opposing viewpoints but with mutual respect -- with withstand this email.
Michael posted here expressing frustration with his experience learning and using Haskell. In my opinion, he has spent too much time reading older papers, written by experts for experts -- which Michael is not. I do not fault Michael for this: these resources are sometimes what appear when searching, and we as a community have done a poor job marshaling our educational resources. (Michael, I just thought of a resource you might find useful: http://dev.stephendiehl.com/hask/ is an oft-linked resource attempting to do that marshaling. I am not vouching for it here, per se, but I know others have found it useful.)
However, Michael very specifically said that "just learn lambda-calculus" was not helpful for him, and so I think it's unhelpful for someone to respond with "just learn lambda-calculus". There are a number of other statements in the email below which could be seen as belittling -- also not helpful.
Instead, I wish that we, as a community, could take posts like Michael's at face value: this is the experience of someone who wants to learn Haskell. While some of the conclusions stated in that post are misunderstandings, it is not the sole fault of the learner for these misunderstandings: instead, we must try to understand what about our community and posted materials induced these misunderstandings, and then seek to improve. Many people in Michael's situation may not have posted at all -- and so this kind of information can be very hard to get.
Michael, I have no silver bullet to offer to you to try to help you here. I do tend to agree with AntC that you have developed some misconceptions that are hindering your continued learning. The terminology actively hurts here. (To be fair, the first Haskell standard pre-dates both Java and C++, and so one could argue who got the terms wrong.) For my part, I am trying to help with this situation both by trying to improve error messages, and though my support of the Haskell Foundation's Haskell School initiative (https://github.com/haskellfoundation/HaskellSchool). These will take time to grow, but my hope is that a future person like you will have an easier route in.
In the meantime, I implore us to take all expressed experiences as exactly that: the experience of the person writing. And if they say they don't want X, please let's not feed them X. :)
Richard
On Sep 16, 2021, at 12:53 AM, Anthony Clayden
wrote: Hi Michael, oh dear, oh dear, oh dear.
The seeds of your confusion are very evident from your message. How to back you out of whatever deep rabbit-hole you've managed to get your head into?
... Your average reader (already a programmer) would be better served by a comparative approach: Here's how to say something in a couple of other programming languages, here's how to say something roughly equivalent in Haskell -- BUT, here's how it's subtly different in Haskell.
No. Just no. Haskell is not "subtly different" to (say) Java in the way that C++ or C# are different. (I'll leave others to judge how subtly different they are.)
Haskell is dramatically and fundamentally different. You can't just 'translate' an algorithm from OOP to Haskell. Many newbies try, and there's many tales of woe on StackOverflow. Just No.
I really don't know how you could have got any experience with Haskell and say "subtly".
I suggest you unlearn everything you think you know about Haskell, and strike out in an entirely different direction. The best approach would be to spend a few days playing with lambda calculus. (That's what I did before tackling Haskell.)
(I've actually been curtly informed on the beginners' list -- yes, the beginner' list! -- that my problems of comprehension can be solved simply: "Learn lambda calculus.")
Lambda calculus is an excellent place for beginners to start. What could be easier to learn? It's certainly easier than grokking a Turing machine; and much easier than Haskell: less than a handful of primitives yet can compute anything computable.
And since the concepts are seldom described in concrete enough and time-honored programming language terms (by comparison to other programming languages)
I'm guessing that the concepts you're talking of simply don't correspond to anything in time-honoured (procedural) programming. Anybody writing about Haskell (including anybody writing the User Guide) assumes a base level of understanding of Haskell. You've clearly veered off the track and haven't yet reached base. Remember the User Guide builds on top of the Language Report.
(On the point of 'time-honoured': lambda calculus is almost exactly the same age as Turing machines. The first well-known programming language using lambda-calculus ideas (LISP 1966) is almost exactly the same age as the first OOP language (Simula 1967). Which is the more time-honoured?)
You do have a point that the terminology in Haskell is often mysterious
[SPJ said] F# had settled on the term "workflow" instead of "monad", and he felt this was wise.
Yes many have yearned for a more warm-and-cuddly term than "monad". But the terminology barrier starts before that.
Haskell typeclasses are not 'classes' in any sense recognisable from OOP. There are no objects, no hidden state, no destructive assignment. We might go back to February 1988 when a strawman for what became typeclasses used OVERLOAD/INSTANCE.
AntC
_______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.
participants (13)
-
Albert Y. C. Lai
-
Andrey Sverdlichenko
-
Brandon Allbery
-
Bryan Richter
-
Chris Smith
-
David Feuer
-
Joachim Durchholz
-
John Beattie
-
Michael Turner
-
Richard Eisenberg
-
Richard O'Keefe
-
Tom Ellis
-
Viktor Dukhovni