The Evolution of a Haskell Programmer (2001)
willamette.edu
willamette.edu
"Haskell is great fun, it's rich enough to be useful but the thing that I think is really important about it is that it's a kind of playful language. It encourages people who want to play and so I've given some examples here about the sort of playing that people do embedded domain-specific language and cunning type programs, but it's a language in which is fun to write programming pearls in which people really do start to do bits of programming as an art form, write papers about them and even get them published and I think this is good not just because it's fun but also because play leads in the end to to new discoveries so I think languages that are playful lead onto to learning new things."
This playfulness is evident whenever you spend enough time in #haskell in IRC, a question about writing a program to reverse a list ends up in a discussion about folds, talking about ADTs leads you to discover a whole new meaning to "(datatype-)generic programming" and so on, there's even a bot that makes your code 100% pointfree (online version at [1])!
In practice, it's not needed to use these super generalized/golfed solutions, but having the knowledge that there's many ways to approach the problem is akin to knowing many licks and scales in Jazz improvisation, makes programming a great deal more fun and flexible.
Here's some code to add a bookmark in an api controller:
https://github.com/jonschoning/espial/blob/master/src/Handle...
And what a beauty it is! How many languages can you do the same thing in so many different, humorous ways? Each one expresses somehow the nature of the programmer who wrote them. Haskell is the art of computer programming at some of its finest.
On the other hand, it also makes for an often frustrating experience of "this would be so much simpler/easier if it were Haskell or at least had x", where x could be algebraic data types, higher order types, Monads, Applicative Functors, dependent types, laziness, and so on and so on...
EDIT: Addendum: Rust scratches some of that itch and seems more and more accepted in the workforce world, so at least that's a good direction we're moving towards.
I don’t know if any of those things are practical but some are useful and some make money ;)
OCaml is also instructive. It’s a little more similar to “industry languages” but definitely close to Haskell; it also has reasonably broad adoption.
Your parents (and the older version of you) that are facing the 33%+ probability of running out of money in old age will agree that solving such a problem is most definitely not a fool's errand.
Otherwise fully agree.
2016 https://news.ycombinator.com/item?id=11060257
2013 https://news.ycombinator.com/item?id=6194759
2011 (a bit) https://news.ycombinator.com/item?id=2424610
2010 (a bit) https://news.ycombinator.com/item?id=1087130
I couldn't remember the title, but remembered it was akin to the journey from novice to Zen master, where each step became more complex, until finally the Zen master reduces all of the complexity down to the simplest possible (but no simpler) expression.
I kept searching for phrases like "Zen of Haskell", but never found it that way. Eventually gave up. Really glad to finally find it again!
Of course by the time you start hitting the CPS iteration you probably shouldn't ever directly write that code in production.
> fac n = product [1..n]
Especially easy to setup if you're using VSCode. Lots of Haskell code forgoes type annotations so with this plugin you can simply hover your mouse over things to see the exact type the compiler inferred.
If you want to master the monad, try the Monad Challenges.
It just "naturally" plays around with the language using very simple concepts, and at the same time showing the simplicity and expressiveness of working with those concepts that would be hard in other languages.
It's a bit of an old book by now, so it covers an older subset of the language (and maybe some very few syntactic details might be different, but I don't think it should impede anything), but for starting out you don't want to go too "wide" anyway.